Files
releases/Dockerfile_debug.in
T
Torin Sandall 1d601cd35a Update build to enable CGO
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>
2018-07-09 14:08:50 -07:00

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"]