Skip to content
Snippets Groups Projects
Commit d3a72174 authored by Daniel Lyons's avatar Daniel Lyons
Browse files

Be more selective about what containers get deleted.

parent 942beee0
No related branches found
No related tags found
1 merge request!278Be more selective about what containers get deleted.
Pipeline #1907 failed
......@@ -71,10 +71,16 @@ coverage:
# Clean up environment
clean:
# Clean up Docker environment
# Clean up Docker environment
docker-compose down
-docker images -aq | xargs docker rmi
docker system prune --volumes -af
# remove nrao: labeled containers
@docker container list --all | grep nrao: | awk '{ print $$1 }' | xargs docker container rm -f
# remove workspaces and nrao labeled images
@docker images | grep 'workspaces\|nrao' | awk '{ print $$3 }' | xargs docker rmi -f
# remove the python egg-info and pytest_cache folders
@find . \( -name "*.egg-info" -o -name ".pytest_cache" \) -exec rm -r {} \;
# Clean things up in a very nasty and destructive way that is sure to derail the rest of your afternoon
reallyclean: clean
docker system prune --volumes -f
docker volume prune -f
# Delete Python cache directories
find . \( -name "*.egg-info" -o -name ".pytest_cache" \) | xargs rm -r
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment