Dockerfile: Go back to scratch

Now that we can build with CGO_ENABLED=0 we do not have to use a base
image that provides libc. Remove distroless for the normal and
rootless images and use scratch instead.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This commit is contained in:
Torin Sandall
2020-04-29 16:14:21 -04:00
parent 7db82e7aa3
commit 8becfb8b39
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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:
+3 -3
View File
@@ -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: