-
Notifications
You must be signed in to change notification settings - Fork 1
docker
Sébastien LUCAS edited this page Jan 5, 2016
·
21 revisions
docker file...
- https://www.digitalocean.com/community/tutorials/docker-explained-using-dockerfiles-to-automate-building-of-images
- Example docker file For httpd image https://github.com/docker-library/httpd/blob/master/2.4/Dockerfile
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
```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
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)