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

keep tracking created containers, best effort clean them up. #1915

Merged
merged 1 commit into from
Nov 21, 2018

Conversation

TingluoHuang
Copy link
Contributor

No description provided.

@TingluoHuang TingluoHuang force-pushed the users/tihuang/dockerimprove2 branch 3 times, most recently from 9fa7768 to 6609928 Compare October 30, 2018 21:36
@TingluoHuang TingluoHuang force-pushed the users/tihuang/dockerimprove2 branch from 6609928 to eecfe94 Compare November 7, 2018 04:22
@TingluoHuang
Copy link
Contributor Author

#1916

@TingluoHuang TingluoHuang force-pushed the users/tihuang/dockerimprove2 branch 3 times, most recently from 1e3f3ad to 866fdd1 Compare November 13, 2018 16:20
@dakale
Copy link
Contributor

dakale commented Nov 13, 2018

There is also https://docs.docker.com/v17.09/engine/reference/run/#pid-equivalent

You may be able to log the container ids to a build-specific file, remove them after succesfully finalizing the job+deleting containers, and have a job to clean up any remaining ones later

Im not sure if its any better but just came across this and thought it could possibly be useful

public override void Initialize(IHostContext hostContext)
{
base.Initialize(hostContext);
DockerPath = WhichUtil.Which("docker", true, Trace);
DockerInstanceLabel = IOUtil.GetPathHash(hostContext.GetDirectory(WellKnownDirectory.Bin)).Substring(0, 5);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be Root dir instead of Bin dir.

@TingluoHuang TingluoHuang force-pushed the users/tihuang/dockerimprove2 branch from 866fdd1 to 0db4f53 Compare November 20, 2018 04:41
@TingluoHuang TingluoHuang force-pushed the users/tihuang/dockerimprove2 branch from 0db4f53 to 60d6af2 Compare November 21, 2018 17:31
@TingluoHuang
Copy link
Contributor Author

#1916

@TingluoHuang TingluoHuang merged commit f5a9d79 into master Nov 21, 2018
@TingluoHuang TingluoHuang deleted the users/tihuang/dockerimprove2 branch November 21, 2018 18:23
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