diff --git a/Dockerfile b/Dockerfile index c197d84bdb..301b0b44f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,9 @@ # Use of this source code is governed by an Apache2 # license that can be found in the LICENSE file. -ARG VARIANT +ARG BASE -FROM gcr.io/distroless/base${VARIANT} +FROM ${BASE} # Any non-zero number will do, and unfortunately a named user will not, as k8s # pod securityContext runAsNonRoot can't resolve the user ID: diff --git a/Makefile b/Makefile index 5633cb3120..62921035d6 100644 --- a/Makefile +++ b/Makefile @@ -212,9 +212,9 @@ build-windows: .PHONY: image-quick image-quick: - $(DOCKER) build -t $(IMAGE):$(VERSION) . - $(DOCKER) build -t $(IMAGE):$(VERSION)-debug --build-arg VARIANT=:debug . - $(DOCKER) build -t $(IMAGE):$(VERSION)-rootless --build-arg USER=1000 . + $(DOCKER) build -t $(IMAGE):$(VERSION) --build-arg BASE=scratch . + $(DOCKER) build -t $(IMAGE):$(VERSION)-debug --build-arg BASE=gcr.io/distroless/base:debug . + $(DOCKER) build -t $(IMAGE):$(VERSION)-rootless --build-arg USER=1000 --build-arg BASE=scratch . .PHONY: push push: