Professional Documents
Culture Documents
Docker Intro Part2
Docker Intro Part2
2)
CMD can be overridden by e.g. a $docker run IMAGE “another command” command
ENTRYPOINT can not be overriden, executes when the container is run
($docker run image). Can take arguments
Could probably be used for retrieving config parameters for the container (e.g. zookeeper
or similar)
If you run a container in detached mode (-d option) you need to know the container ID in
order to stop it using the “docker stop <container ID>” command. It will also work with
container name.
If parts that you used to build your image already is existing in docker hub (e.g.
ubuntu:14.04 then it will skip pushing that part and only reference it to)
Possible usage, multiple containers can have a common log volume
Apa-folder
Central Log
Katt-folder
analyzer
Hund-folder
Using ”-p” you are telling what port on the host where docker runs that are mapped to the
container port. So in example above <myip>:8080 → <container>:80
”db” is an alias.