Dockerfile 构建镜像 - 每天5分钟玩转容器技术(13)
Dockerfile 是一个文本文件,记录了镜像构建的所有步骤。 第一个 Dockerfile 用 Dockerfile 创建上节的 ubuntu-with-vi,其内容则为: 下面我们运行 docker build 命令构建镜像并详细分析每个细节。 root@ubuntu:~# pwd ① /root root@ubuntu:~# ls ② Dockerfile root@ubuntu:~# docker build -t ubuntu-with-vi-dockerfile . ③ Sending build context to Docker daemon 32.26 kB ④ Step 1 : FROM ubuntu ⑤ ---> f753707788c5 Step 2 : RUN apt-get update && apt-get install -y vim ⑥ ---> Running in 9f4d4166f7e3 ⑦ ...... Setting up vi...
