diff --git a/Makefile b/Makefile index 25fdee19d..04bb600c3 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ all: \ clean: rm -rf bin/* -publish: \ +publish: docker-scan \ publish-victoria-metrics \ publish-vmagent \ publish-vmalert \ diff --git a/deployment/docker/Makefile b/deployment/docker/Makefile index 0479c8be4..6def5a869 100644 --- a/deployment/docker/Makefile +++ b/deployment/docker/Makefile @@ -16,6 +16,9 @@ package-base: --tag $(BASE_IMAGE) \ deployment/docker/base +docker-scan: package-base + docker scan --accept-license $(BASE_IMAGE) || (echo "❌ The build has been terminated because critical vulnerabilities were found in $(BASE_IMAGE)"; exit 1) + package-builder: (docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -q '$(BUILDER_IMAGE)$$') \ || docker build \