mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
8becfb8b39
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>
20 lines
553 B
Docker
20 lines
553 B
Docker
# Copyright 2019 The OPA Authors. All rights reserved.
|
|
# Use of this source code is governed by an Apache2
|
|
# license that can be found in the LICENSE file.
|
|
|
|
ARG BASE
|
|
|
|
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:
|
|
# https://github.com/kubernetes/kubernetes/issues/40958. Make root (uid 0) when
|
|
# not specified.
|
|
ARG USER=0
|
|
|
|
MAINTAINER Torin Sandall <torinsandall@gmail.com>
|
|
COPY opa_linux_amd64 /opa
|
|
USER ${USER}
|
|
ENTRYPOINT ["/opa"]
|
|
CMD ["run"]
|