mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
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:
+2
-2
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user