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

Atualização do Makefile para otimização de atualização dos containers. #165

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
MAKEFLAGS += --no-print-directory

# Variables
compose = docker-compose-dev.yml
REPO_SLUG = infrascielo
PROJECT_NAME = opac_5

Expand Down Expand Up @@ -263,12 +262,14 @@ release_docker_push:
##image update##
#################

exclude_opac_production: ## Exclude all productions containers
exclude_opac_production: ## Exclude all production images
@if [ -n "$$(docker images --filter=reference='infrascielo/opac_5' -q)" ]; then \
docker rmi -f $$(docker images --filter=reference='infrascielo/opac_5' -q ); \
echo "Exclude all opac production containers" \
echo "Deleting containers $$(docker images --filter=reference='infrascielo/opac_5' -q --format '{{.Repository}}:{{.Tag}}')"; \
docker rmi -f $$(docker images --filter=reference='infrascielo/opac_5' -q); \
else \
echo "No images found for '*_prod'"; \
echo "No images found for 'infrascielo/opac_5'"; \
fi

update: stop rm exclude_opac_production up
# help: update - stop, remove old images, and start the containers
.PHONY: update
update: stop exclude_opac_production up