This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13317|Reply: 1

docker run's --rm option

[Copy link]
Posted on 2/14/2019 5:29:39 PM | | |
When a Docker container exits, the file system inside the default container is still preserved to facilitate debugging and preserve user data.

However, for foreground containers, since they are only running for a short period of time during development and debugging,There is no need to retain user data, so the --rm option can be set when the container starts, so that the file system inside the container can be automatically cleaned when the container exits.Examples include:

docker run --rm bba-208

Equivalent to

docker run --rm=true bba-208


Obviously,-- rm option cannot be used at the same time as -d, i.e. only the foreground container can be automatically cleaned, not the detached container
Note,-- rm option also cleans the container's anonymous data volumes.

So, executing the docker run command with the --rm command option is equivalent to executing docker rm -v after the container exits.



Reference links:

The hyperlink login is visible.




Previous:init: function () jquery对象的构造函数
Next:JavaScript Method
 Landlord| Posted on 10/29/2021 11:38:29 AM |
Bulk stop docker containers

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com