Skip to content

Commit

Permalink
Add clean_docker command to remove local cache artifacts enabling pri…
Browse files Browse the repository at this point in the history
…stine builds
  • Loading branch information
KevinMind committed Mar 21, 2024
1 parent 0d4392d commit f591615
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile-os
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ build_docker_image: create_docker_builder ## Build the docker image
rm -rf $(DOCKER_CACHE_DIR)
mv $(DOCKER_CACHE_DIR)-new $(DOCKER_CACHE_DIR)

.PHONY: clean_docker
clean_docker: ## Clean up docker containers, images, caches, volumes and local cache directories. Use with caution. To restart the app run make initialize_docker after this commandUse with caution.
docker compose down --rmi all --volumes
docker rmi $(DOCKER_TAG) || true
rm -rf $(DOCKER_CACHE_DIR)
rm -rf ./deps/**

.PHONY: initialize_docker
initialize_docker: create_env_file
# Run a fresh container from the base image to install deps. Since /deps is
Expand Down

0 comments on commit f591615

Please sign in to comment.