Skip to content

Commit 35483b1

Browse files
authored
add clean-images target (#2067)
1 parent 887f724 commit 35483b1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,17 @@ build-multiplatform-and-push:
115115
# Because buildx bake does not support --env-file yet, we need to load it into the environment first.
116116
set -a; . ./.env.override; set +a && docker buildx bake -f docker-compose.yml --push --set "*.platform=linux/amd64,linux/arm64"
117117

118+
.PHONY: clean-images
119+
clean-images:
120+
@docker rmi $(shell docker images --filter=reference="ghcr.io/open-telemetry/demo:latest-*" -q); \
121+
if [ $$? -ne 0 ]; \
122+
then \
123+
echo; \
124+
echo "Failed to removed 1 or more OpenTelemetry Demo images."; \
125+
echo "Check to ensure the Demo is not running by executing: make stop"; \
126+
false; \
127+
fi
128+
118129
.PHONY: run-tests
119130
run-tests:
120131
$(DOCKER_COMPOSE_CMD) $(DOCKER_COMPOSE_ENV) -f docker-compose-tests.yml run frontendTests

0 commit comments

Comments
 (0)