August 2018
Intermediate to advanced
372 pages
9h 29m
English
The CMD command is used to specify which command should be executed once the container is started. For example, if you want to run a Java application using the standard java -jar command, you will need to add the following line to the file:
CMD java - jar your-application.jar
Once you have completed your Dockerfile, you should run the build command to create the image locally, as shown in the following code:
docker build -t <docker-image-name>
Read now
Unlock full access