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

Execute system prune and rmi in cleanup #407

Open
SeJunB opened this issue Sep 29, 2023 · 1 comment
Open

Execute system prune and rmi in cleanup #407

SeJunB opened this issue Sep 29, 2023 · 1 comment

Comments

@SeJunB
Copy link

SeJunB commented Sep 29, 2023

Hello,

My team is currently using the plugins/ecr, and I noticed that the commands docker rmi and docker system prune -f are printed in the logs, but these commands are never executed; we are mounting the host machine's docker daemon. Looking at the code, thedocker rmi and docker system prune -f commands are printed out using the trace function but is never executed. This PR fixes this.

Related issue #378.

@SeJunB
Copy link
Author

SeJunB commented Sep 29, 2023

I recommend only removing the images and not executing the docker system prune -f in the cleanup stage, as running this command can interfere with concurrent builds that share the host's Docker daemon.

Scenario
Consider two pipelines: Pipeline A and Pipeline B that are running in parallel. If Pipeline A executes docker system prune -f just as Pipeline B is about to start a step that uses the host machine's Docker daemon, the prune command could remove resources the network that Pipeline B relies on. This will lead to a failure in Pipeline B's execution.

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

No branches or pull requests

1 participant