Files
releases/Dockerfile
T
Torin Sandall daff1b4abc build: Fix dirty working copy on travis build and more
This commit combines a few changes to the build. Namely:

1. The travis build no longer works off a dirty working copy. The
.dockerignore file was excluding the docs directory which caused the
working copy to become dirty during the build process. While this
isn't a huge issue it does make it harder to be confident about the
state of the source that Travis binaries are built from. As part of
this change, we remove the builder image in favour of running the
golang image and volume mounting the working copy. This is avoids the
copy that is quite expensive in the OPA repo.

2. In the recent build refactoring, the wasm development workflow was
broken. Changes to the wasm library were not getting picked up
automatically when running the wasm/rego tests. This commit fixes the
makefile so that the wasm libary is rebuilt and the wasm blob is
copied and regenerated each time the wasm/rego tests are run.

Finally, this commit leans into modules a bit more removing the
scheduler test dependency on GOPATH.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2019-09-27 15:52:58 -04:00

20 lines
581 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 VARIANT
# 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
FROM gcr.io/distroless/base${VARIANT}
MAINTAINER Torin Sandall <torinsandall@gmail.com>
COPY opa_linux_amd64 /opa
USER ${USER}
ENTRYPOINT ["/opa"]
CMD ["run"]