File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1- FROM gcr.io/distroless/static
1+ FROM gcr.io/distroless/static as release
22
33# TARGETPLATFORM comes from the buildx context and it will be something like `linux/arm64/v8` or `linux/amd64`.
44# Ref: https://docs.docker.com/buildx/working-with-buildx/
@@ -7,6 +7,10 @@ ARG TARGETPLATFORM
77USER 1000:1000
88
99COPY ./builds/${TARGETPLATFORM}/preflight /bin/preflight
10+
11+ # '/usr/share/doc/$PACKAGE' is a pretty standard location for notices. In particular Debian does it this way.
12+ COPY ./builds/licenses /usr/share/doc/preflight/
13+
1014# load in an example config file
1115ADD ./agent.yaml /etc/preflight/agent.yaml
1216ENTRYPOINT ["preflight" ]
Original file line number Diff line number Diff line change @@ -21,3 +21,11 @@ RUN make build-all-platforms \
2121 OAUTH_CLIENT_ID=${oauth_client_id} \
2222 OAUTH_CLIENT_SECRET=${oauth_client_secret} \
2323 OAUTH_AUTH_SERVER_DOMAIN=${oauth_auth_server_domain}
24+
25+
26+ # c781b427440f8ea100841eefdd308e660d26d121 is the v1.0.0 tag at the time of writing.
27+ RUN go install github.com/google/go-licenses@c781b427440f8ea100841eefdd308e660d26d121
28+
29+ # We need this '|| true' because go-licenses could fail to find a license so
30+ # may return a non-zero exit code and there's no way to supress it.
31+ RUN /go/bin/go-licenses save ./ --save_path="./builds/licenses/" || true
You can’t perform that action at this time.
0 commit comments