deployment/docker: allow using / chars in ROOT_IMAGE when running make package-*

This fixes the following command:

ROOT_IMAGE=gcr.io/distroless/static make package-victoria-metrics
This commit is contained in:
Aliaksandr Valialkin 2021-11-14 12:21:32 +02:00
parent 49ee952e9a
commit 129b0d2b22
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -5,8 +5,8 @@ DOCKER_NAMESPACE := victoriametrics
ROOT_IMAGE ?= alpine:3.14.3 ROOT_IMAGE ?= alpine:3.14.3
CERTS_IMAGE := alpine:3.14.3 CERTS_IMAGE := alpine:3.14.3
GO_BUILDER_IMAGE := golang:1.17.3-alpine GO_BUILDER_IMAGE := golang:1.17.3-alpine
BUILDER_IMAGE := local/builder:2.0.0-$(shell echo $(GO_BUILDER_IMAGE) | tr : _) BUILDER_IMAGE := local/builder:2.0.0-$(shell echo $(GO_BUILDER_IMAGE) | tr :/ __)
BASE_IMAGE := local/base:1.1.3-$(shell echo $(ROOT_IMAGE) | tr : _)-$(shell echo $(CERTS_IMAGE) | tr : _) BASE_IMAGE := local/base:1.1.3-$(shell echo $(ROOT_IMAGE) | tr :/ __)-$(shell echo $(CERTS_IMAGE) | tr :/ __)
package-base: package-base:
(docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -q '$(BASE_IMAGE)$$') \ (docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -q '$(BASE_IMAGE)$$') \