Creating our Dockerfile

Dockerfile are text files, usually collocated with applications that instruct Docker how to build a new Docker image. Through the creation of those files, you have the ability to tell Docker which Docker image to start from, what to copy on the container filesystem, what network port to expose, and so on. You can find the full documentation of the Dockerfile at

We are going to create a Dockerfile for our helloworld application at the root of the helloworld project:

$ cd helloworld$ touch Dockerfile

The first instruction of a Dockerfile is always a FROM instruction. This tells Docker which Docker image to start from. We could use the Alpine image as we did, but we can also save some time by ...

Get Effective DevOps with AWS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.