This is a casual Docker tutorial series. We started out first with very simple sessions on how to install and use the docker run command. In future videos we will hit more advanced topics.
In this seventh video we cover more advanced uses of building images with Dockerfiles. We will look at a couple of the Docker Hub repos as different examples to create Apache images..
This is a casual Docker tutorial series. We will start out first with very simple sessions on how to install and use the docker run command. In future videos we will hit more advanced topics.
In this sixth video we cover a the basics of a Dockefile. We cover basic commands such as FROM, RUN and CMD along with other basic Dockerfile commands. Basically the tutorial describes the Dockerfile DSL.
I received some great feedback from Tibor Vass (@tiborvass). I want to add some of his comments here and I will cover them in a little more detail on Part 2 of this tutorial. Here goes...
In general you want to use the JSON/Array format for the CMD and the ENTRYPOINT commands. If you use the non JSON the child processes might not get signaled. Therefore it is best practice to use the JSON format for those commands. Also, ENVAR substitution (i.e., environment variable) substitution only happens with the non JSON format. Therefore it might be a good practice to use non JSON on the RUN command.
It is encouraged to use the COPY command instead of the RUN command when untarring or downloading is not needed.