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

Add auto-clean functionality #2

Merged
merged 6 commits into from Dec 9, 2018
Merged

Add auto-clean functionality #2

merged 6 commits into from Dec 9, 2018

Conversation

qur
Copy link
Contributor

@qur qur commented Dec 9, 2018

Add a command line option, and local config setting to enable automatic cleaning of old containers. If you call run with the --auto-clean option, or set the auto-clean local config setting to true, then any container that was built from old configuration or an old image will be removed and replaced with a new one.

This has the same functional effect as always running with --clean, except it doesn't remove the container if the config hasn't changed.

Handy for scripts, now you can have the convenience of always running
with --clean without the overhead of always rebuilding the container.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
We don't really need a terminal, and might not have one.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
If there is a wr command available that doesn't support --auto-clean build
fails, so add --auto-clean to the bootstrap check ...

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Now you can make auto-clean the default behaviour by enabling it in your local
configuration file. If you wish to explictly not use it, then you can specify
the --no-auto-clean command line option.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
If we remove the container because it was out of date (and removeOld was set),
then we should immediately hand off to Create - as we would if the container
didn't exist in the first place.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
@qur qur merged commit bf78ad9 into master Dec 9, 2018
@qur qur deleted the auto-clean branch December 9, 2018 01:18
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.

None yet

1 participant