April 2017
Beginner
404 pages
9h 30m
English
CMD instructs the Docker Engine to execute the command on the container. There can only be one CMD in a Dockerfile, which can be overridden while creating a container. If there are more CMD commands in a Dockerfile only the last one will be considered. For example, the following command will ping the localhost once the container is successfully created:
CMD [ "ping localhost -t" ]
Read now
Unlock full access