Skip to content
Sébastien LUCAS edited this page Jan 5, 2016 · 21 revisions

Official packages

How to use a docker image

docker file...

How to

List active docker containers

docker ps -l

Output

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                           NAMES
00bb4123c87d        nginx               "nginx -g 'daemon off"   57 minutes ago      Up 57 minutes       0.0.0.0:32769->80/tcp, 0.0.0.0:32768->443/tcp   mysite

Run and build a docker image

First build the container

```docker build -t my-apache2 .````

  • docker command
  • build docker command
  • -t option to give a name : my-apache2 -t, --tag= Repository name (and optionally a tag) for the image
  • . read the content of a docker file in the current directory

Then run it

docker run --name=apache -i -t my-apache2

  • docker command
  • run docker command
  • --name=apache option to set the name of the container (the running container,not the saved image)

WIKI by Sébastien Lucas CEO & Funder or Bricks

Clone this wiki locally