Dockerfile commands

Docker has documentation on how to write a Dockerfile at https://docs.docker.com/engine/reference/builder/, and a set of best practices that they recommend at https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/. We will cover some of the commands that are common and important to know for building your own container images.

The following are some of the important Dockerfile build commands that you should be aware of:

  1. FROM (https://docs.docker.com/engine/reference/builder/#from): FROM describes the image that you are using as a base to build your container, and is generally the first command in a Dockerfile. Docker best practices encourage the use of Debian as a base Linux distribution. As you ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.