Images之Dockerfiles

Best practices for writing Dockerfiles

This document covers recommended best practices and methods for building efficient images.

Docker builds images automatically by reading the instructions from a Dockerfile -- a text file that contains all commands, in order, needed to build a given image.

A Dockerfile adheres to a specific format and set of instructions which you can find at Dockerfile reference.

A Docker image consists of read-only layers each of which represents a Dockerfile instruction. The layers are stacked and each one is a delta of the changes from the previous layer. Consider this Dockerfile:

猜你喜欢

转载自www.cnblogs.com/panpanwelcome/p/9269980.html