However, if I give option --rm=false --force-rm=true, sdc-docker does not remove the intermediate containers while the upstream docker removes them.
> docker build --rm=false --force-rm=true .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM ubuntu:latest
---> 56465e1e45d2
Step 2 : RUN touch /etc/hello
---> Running in 18042604d794
---> 327977df8d00
Step 3 : RUN touch /etc/world
---> Running in 18042604d794
---> c240401e32c0
Importing image 327977df8d00 into IMGAPI
Importing image c240401e32c0 into IMGAPI
Successfully built c240401e32c0
> docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
18042604d794 ubuntu "/bin/sh -c 'touch /e" 30 seconds ago Exited (0) 11 seconds ago build_ce53e610-b607-11e6-bbd0-6f73ca1fdff5
Well.. the combination of --rm=false and --force-rm=true might not be practical,
but I want to fix the difference between the behaviors of sdc-docker and the upstream docker.
According to the documents listed below,
docker build
command with--force-rm=true
option should always remove intermediate containers.However, if I give option
--rm=false --force-rm=true
, sdc-docker does not remove the intermediate containers while the upstream docker removes them.Well.. the combination of
--rm=false
and--force-rm=true
might not be practical, but I want to fix the difference between the behaviors of sdc-docker and the upstream docker.(I uploaded patch for this: https://cr.joyent.us/#/c/964/)