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 -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

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