-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Implement a "run once" command to run containers with --rm option. #945
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
Conversation
- Helpful when running one-shot commands (e.g. cron jobs) that don't need to preserve the environment once exited. Also prevents the disk to filling up with dangling containers.
|
Why not just make --rm default? |
|
Also, this could be implemented using the |
True.
I'm fine with that, though if you set it as default then you'd need to provide the user with an interface to disable it. |
|
Under what conditions wouldn't we want it default for the run command? |
|
This was brought up in another issue. Can't recall at the moment but some folks use |
I definitely agree. I didn't feel like adding --rm to DOKKU_RUN_OPTS by default as that would break the dokku run's present interface. |
|
I don't want to add a new option here. Perhaps we can add something to the .dokkurc directory? DOKKU_REMOVE_CONTAINER=1 or similar to how we do DOKKU_TRACE? |
|
|
|
I have command line args working in a local branch that sets env variables like this one. I'll push it up in a bit. Let me know what you guys think. |
|
Cool, good one! |
|
Closing this in favor of @michaelshobbs's PR. Thanks @alessio for the initial try! |
need to preserve the environment once exited. Also prevents the
disk to filling up with dangling containers.