基础指令
FROM
FROM <image>
FROM <image>:<tag>
# 例:
FROM ubuntu-base
说明:
- FROM 是 Dockerfile 里的第一条而且只能是除了首行注释之外的第一条指令
- 构建基于哪个镜像,来构建自定义镜像
MAINTAINER
MAINTAINER <name>
# 例:
MAINTAINER Hacker.Liu 124765984@qq.com
说明
- 指定该 dockerfile 文件的维护者信息。类似我们在 docker commit,时候使用-a 参数指定的信息
RUN
RUN <command> (shell模式)
RUN["executable", "param1", "param2"] (exec 模式)
# 例:
RUN apt-get update && apt-get install nginx
说明