Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do pass --rm to automatically remove container once it stops? #61

Open
salmanulhaq opened this issue Feb 12, 2019 · 4 comments
Open
Labels

Comments

@salmanulhaq
Copy link

How do I pass --rm option when creating a container to make sure it automatically gets killed once it stops after CMD execution?

@beeman
Copy link

beeman commented Mar 4, 2019

When creating a container you can set AutoRemove to true in the HostConfig object.

@salmanulhaq
Copy link
Author

Awesome, thanks!

@salmanulhaq
Copy link
Author

is there an exhaustive list of config parameters in documentation somewhere? That will be very useful

@beeman
Copy link

beeman commented Mar 5, 2019

I've been using the API docs mostly. This specific flag is not even documented, I found it by searching the output of docker inspect <container>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants