-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rhtap dockerfile with allowed image references
See the details in the associated task. Refs: - https://issues.redhat.com/browse/ACM-7178 Signed-off-by: Gus Parvin <[email protected]>
- Loading branch information
1 parent
1448ed6
commit 0ecd13b
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Stage 1: Use image builder to build the target binaries | ||
# Copyright Contributors to the Open Cluster Management project | ||
|
||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder | ||
|
||
ENV COMPONENT=governance-policy-propagator | ||
ENV REPO_PATH=/go/src/github.com/stolostron/${COMPONENT} | ||
WORKDIR ${REPO_PATH} | ||
COPY . . | ||
RUN go mod vendor | ||
RUN make build | ||
|
||
# Stage 2: Copy the binaries from the image builder to the base image | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
ENV COMPONENT=governance-policy-propagator | ||
ENV REPO_PATH=/go/src/github.com/stolostron/${COMPONENT} | ||
ENV OPERATOR=/usr/local/bin/${COMPONENT} \ | ||
USER_UID=1001 \ | ||
USER_NAME=${COMPONENT} | ||
|
||
# install operator binary | ||
COPY --from=builder ${REPO_PATH}/build/_output/bin/${COMPONENT} ${OPERATOR} | ||
|
||
COPY --from=builder ${REPO_PATH}/build/bin /usr/local/bin | ||
RUN /usr/local/bin/user_setup | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint"] | ||
|
||
RUN microdnf update && \ | ||
microdnf clean all | ||
|
||
USER ${USER_UID} |