这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@alessio
Copy link
Contributor

@alessio alessio commented Feb 5, 2015

  • 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.

- 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.
@josegonzalez
Copy link
Member

Why not just make --rm default?

@josegonzalez
Copy link
Member

Also, this could be implemented using the DOCKER_ARGS pluginhook.

@alessio
Copy link
Contributor Author

alessio commented Feb 5, 2015

Also, this could be implemented using the DOCKER_ARGS pluginhook.

True.

Why not just make --rm default?

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.

@josegonzalez
Copy link
Member

Under what conditions wouldn't we want it default for the run command?

@michaelshobbs
Copy link
Member

This was brought up in another issue. Can't recall at the moment but some folks use run to execute cron jobs. I think it's useful to have the containers around for troubleshooting

@alessio
Copy link
Contributor Author

alessio commented Feb 5, 2015

I think it's useful to have the containers around for troubleshooting

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.

@josegonzalez
Copy link
Member

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?

@michaelshobbs
Copy link
Member

DOKKU_RM_CONTAINER please. Reduce, reuse, recycle keystrokes. 😄

@michaelshobbs
Copy link
Member

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.

michaelshobbs added a commit that referenced this pull request Feb 5, 2015
@alessio
Copy link
Contributor Author

alessio commented Feb 6, 2015

Cool, good one!

@josegonzalez
Copy link
Member

Closing this in favor of @michaelshobbs's PR. Thanks @alessio for the initial try!

michaelshobbs added a commit that referenced this pull request Feb 6, 2015
first stab at a common functions library. include argument parsing and a few definitions wired up. closes #932. closes #945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants