Docker Tutorial #4: Dockerfile — Build Your Own Docker Image
A Dockerfile is a text file with instructions that tell Docker how to build your image. Every Docker image — from nginx to postgres to your own app — starts with a Dockerfile. In this tutorial, you will learn every key Dockerfile instruction and write a complete, production-ready Dockerfile. Dockerfile Basics A Dockerfile is a plain text file named Dockerfile (no extension). Docker reads it top to bottom when building an image. Each instruction creates a new layer. ...