[root@master flask-hello-world]# docker build -t moluo/flask-hello-world .
Sending build context to Docker daemon 4.096kB
Step 1/7 : FROM python:2.7
---> 55b47eef9c39
Step 2/7 : LABEL maintainer="moluo<moluo@163.com>"
---> Using cache
---> 8a73e1a8525f
Step 3/7 : RUN pip install flask
---> Using cache
---> f3b1e6583f24
Step 4/7 : COPY app.py /app
---> 122167530f7c
Step 5/7 : WORKDIR /app
Cannot mkdir: /app is not a directory
编译过程第5步出错了,我们进入第4步编译生成的临时镜像122167530f7c进行排错,命令如下
[root@master flask-hello-world]# docker run -it 122167530f7c /bin/bash
root@2a1b23080633:/# ls
app bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@2a1b23080633:/# cd app
bash: cd: app: Not a directory