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

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

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

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