O'Reilly logo

Effective DevOps with AWS - Second Edition by Nathaniel Felsen, Giuseppe Borgese, Yogesh Raheja

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating our Dockerfile

Dockerfiles are text files that are usually collocated with applications that instruct Docker on 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 http://dockr.ly/2jmoZMw. We are going to create a Dockerfile for our Hello World application, at the root of the helloworld project that we created in our GitHub repository, using the following commands:

$ cd helloworld$ touch Dockerfile

The first instruction of a Dockerfile is always a FROM instruction. This tells Docker which Docker image to start ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required