What does `--rm` do when running a docker image with data volumes? -


while going through docker documentation on running images mounted volumes following command has --rm flag set on it.

$ docker run --rm -it -v ~/.bash_history:/.bash_history ubuntu /bin/bash 

what --rm flag do?

as in docs:

--rm=false: automatically remove container when exits (incompatible -d)

the container being run automatically removed finishes work. volumes should stay untouched.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -