一、FROM
选择构建Docker image的base image。
FROM scratch # 制作base image
FROM centos # 使用centos image作为base image
二、LABEL
image的相关描述。
LABEL maintainer="Xxx@xx.com"
LABEL version="1.0"
LABEL description="This is description"
三、RUN
每执行一次RUN,image就会分层。为了避免无用分层,通过&&
符号可以合并成一层。