mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
1d601cd35a
These changes modify the build to leave CGO enabled (as opposed to disabling it explicitly.) This will make it possible to load Go libraries dynamically. Since CGO is enabled, we have cannot use the scratch or alpine base images any more. To replace them, we are using the "distroless" images from GoogleContainerTools[1]. These images are intended to run statically compiled languages like Go and Rust. They have a minimal number of dependencies (importantly, glibc) and produce relatively small images (~30MB.) The old images were ~20MB in size. These changes enable a second "debug" image flavor which is based off distroless "debug". This image includes a shell and other things that are useful for debug purposes. In addition, the image includes the "diff" program which is used by opa fmt --diff and required by the open-policy-agent/library repo build. [1] https://github.com/GoogleContainerTools/distroless Signed-off-by: Torin Sandall <torinsandall@gmail.com>
14 lines
304 B
Plaintext
14 lines
304 B
Plaintext
# Copyright 2018 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.
|
|
|
|
FROM gcr.io/distroless/base:debug
|
|
|
|
MAINTAINER Torin Sandall <torinsandall@gmail.com>
|
|
|
|
ADD opa_linux_GOARCH /opa
|
|
|
|
ENTRYPOINT ["/opa"]
|
|
|
|
CMD ["run"]
|