2016-08-23 4025 views
0

我建立一個圖像: Dockerfile:docker build --no-cache = true仍然使用緩存構建?

FROM centos:7 

build命令:

$ docker build -t my-image:1.0 . 

現在我做一個第二圖像(它是基於原始dockerfile) Dockerfile:

FROM centos:7 
RUN yum install -y mysql 

我使用--no-cache選項生成true

$ docker build --no-cache=true -t my-image:1.1 . 

Sending build context to Docker daemon 2.048 kB 
Step 1 : FROM centos:7 
---> 970633036444 
Step 2 : xx 

它似乎使用緩存。當我嘗試刪除我的圖像:1.0:

docker rmi 970633036444 
Error response from daemon: conflict: unable to delete 970633036444 (cannot be forced) - image has dependent child images 

我在做什麼錯?

回答

相關問題