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

Fix an issue where you couldn't run 'all' command inside container #23

Merged
merged 1 commit into from
Aug 8, 2016
Merged

Conversation

withinboredom
Copy link
Contributor

  • What I did
    Ignores itself instead of trying to stop itself if running from inside a docker container
  • How I did it
    Check to see if there's a /proc/1/cgroup folder/file and if so, use that as an id to exclude
  • Does it need a test written for it?
    Maybe??
  • Description for the changelog
    Don't try to stop the container it may be running in
  • Does it pass a ShellCheck? (excluding changes to .bats files see our CONTRIBUTING.md)
    Yes

@withinboredom
Copy link
Contributor Author

This might open the door for an exclusion flag as well ... which would be nice (don't stop containers with name=something or something like that.

Let me know if I can make this better!

@withinboredom
Copy link
Contributor Author

PS: this should be compatible with docker 1.8 +

@killianbrackey killianbrackey merged commit 1c9a872 into ZZROTDesign:master Aug 8, 2016
@killianbrackey
Copy link
Contributor

Thanks again! We plan on writing some more tests and refactoring a bit so we will keep you in the loop!

@kilpatty
Copy link
Member

kilpatty commented Aug 8, 2016

Thanks for all the pulls! We really appreciate the great work!

@withinboredom
Copy link
Contributor Author

Welcome, glad I could be of service -- your project just became part of dev environment and build maintenance scripts (this project is way more thorough than spotify/docker-gc)!

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