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

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -

SQL Server - MyCTE query based on 24 hour period (next day) -