John Willis

Docker Tutorial 6 – Dockerfile (Part 1)

John Willis

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 sixth video we cover the basics of a Dockerfile. We cover basic commands such as FROM, RUN and CMD along with other basic Dockerfile commands. Basically the tutorial describes the Dockerfile DSL.

Screen Shot 2015-04-22 at 8.30.35 AM

Additional Notes:

I received some great feedback from Tibor Vass.  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.


Thank you,

John Willis

Learn More about Docker

Continue reading...


2 thoughts on “Docker Tutorial 6 – Dockerfile (Part 1)

  1. Satyam Sundar Panda

    Hello sir,

    Earlier i was watching your docker videos from youtube and it was really helpful, but now suddenly it is saying the videos are private videos. Can you please check this issue, your Docker videos tutorials are great help for beginners.

Leave a Reply