Docker Community Forums

Share and learn in the Docker community.

Conflicting options: --rm and -d


(Smrt28) #1


This is written in the docker run man: “If you choose to run a container in the detached mode, then you cannot use the -rm option.”. Is there a reason for that?


(Reinhrst) #2

I was wondering exactly the same thing, and gives a hint, as well as . The technical issue is that the --rm is handled in the client, and a -d means that the client detaches (long) before the container terminates.

(Smrt28) #3

Thanks for reply. I’m implementing a system of masters and workers. Worker holds no data, the only resource it needs is a CPU, the only data written to the storage is a temporal mess. It returns result to the master. So, “-rm -d” would make sense here since restarting would “clear” the messy worker container.