-
Notifications
You must be signed in to change notification settings - Fork 17
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 docker clean #656
Fix docker clean #656
Conversation
Addressed reviews - with Another warning: we are still removing ALL dangling containers and ALL images! |
…-ai/lumigator into davide/makefile-docker-clean-fix
I added a commit with a possible solution for image removing:
WDYT @agpituk ? |
That works very well for me, thanks @aittalam !! About the question, I agree, |
What's changing
make clean-docker-all
breaks when no containers are running because the first commandclean-docker-containers
returns an error if the list of containers is empty.This PR fixes that by using
xargs
to pass the list (when not empty) todocker rm
anddocker rmi
.Closes #660
How to test it
run
make clean-all
ormake clean-docker-all
. This should remove all containers + images if present, without breaking if there is noneAdditional notes for reviewers
I am not sure why we'd need both
make clean-all
andmake clean-docker-all
. The semantics I had in mind was "clean-all should call clean-docker-all plus something else" but that does not happen (actually this is a subset ofclean-docker-all
). WDYT? Should we removeclean-all
or is there a good reason to keep it (perhaps with a different name)?/docs
)