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 support for stopping containers by image #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alde
Copy link

@alde alde commented Sep 16, 2017

We usually don't assign names to our containers, but want to be able to auto-stop them based on the image name instead.

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like some tests are failing

def build_image_matcher(images):
def matcher(container):
return any(
container.get('Config',{}).get('Image').startswith(image)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this need to be .get('Image', "") so that startswith is always called on a string?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@alde
Copy link
Author

alde commented Sep 18, 2017

I'm very embarassed to not have run the tests before.

Now they pass locally, but on travis I'm getting some pre-commit hook error that I'm unfamiliar with

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.

2 participants