FROM | 基础镜像 |
ENV | 环境变量,变化后会其后命令不使用缓存 |
ADD |
添加url地址文件或本地文件到docker容器指定位置,若文件是压缩包,会自动解压后添加到容器目录 变化后会其后命令不使用缓存 |
COPY | 类似ADD,不支持url文件,不支持解压 |
RUN | 构建容器时执行的命令,比如安装更新某个软件 |
ENTRYPOINT | 容器启动时执行的命令,写死的命令,不能在docker run 命令行中指定参数覆盖它 |
CMD |
容器启动时执行的命令,默认的命令,若在docker run 命令行中指定参数,则CMD的配置被覆盖, 一般与ENTRYPOINT连用,ENTRYPOINT写死命令前部分,CMD用于写可更改个性参数 |
EXPOSE | 容器对宿主机暴露的端口 |
VOLUME | |
ONBUILD | https://www.cnblogs.com/51kata/p/5265107.html |