Skip to content

Commit

Permalink
Add repos LICENSE file in image under /licenses dir
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Nov 13, 2024
1 parent f372e80 commit dcb40f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ARG VERSION={{.version}}
{{- end }}

COPY --from=builder /usr/bin/main {{.app_file}}
COPY --from=builder /go/src/{{.main}}/LICENSE /licenses/

USER 65532

Expand Down
2 changes: 2 additions & 0 deletions cmd/generate/dockerfile-templates/FuncUtilDockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

WORKDIR /go/src/{{.main}}
COPY . .

ENV CGO_ENABLED=1
Expand All @@ -22,6 +23,7 @@ RUN microdnf install socat tar
{{- end }}

COPY --from=builder /usr/bin/main {{.app_file}}
COPY --from=builder /go/src/{{.main}}/LICENSE /licenses/

RUN ln -s {{.app_file}} /usr/local/bin/deploy && \
ln -s {{.app_file}} /usr/local/bin/scaffold && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ COPY --from=cli-artifacts /usr/share/openshift/linux_$TARGETARCH/{{ .oc_binary_n

# Copy all collection scripts to /usr/bin
COPY must-gather/bin/* /usr/bin/
COPY LICENSE /licenses/

RUN microdnf install -y rsync tar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN microdnf update tzdata -y && microdnf reinstall tzdata -y
RUN microdnf install rsync

COPY --from=builder /usr/bin/main /usr/bin/discover
COPY --from=builder /go/src/cmd/discover/LICENSE /licenses/

USER 65532

Expand Down

0 comments on commit dcb40f0

Please sign in to comment.