From adc5f98cb0d7a92b9f25de12c873be0e3ef8f806 Mon Sep 17 00:00:00 2001 From: Philip Wu <81585886+philipwu08@users.noreply.github.com> Date: Tue, 10 Oct 2023 10:12:17 -0400 Subject: [PATCH] Add dockerfile for rhtap (#81) Signed-off-by: philipwu08 --- build/Dockerfile.rhtap | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 build/Dockerfile.rhtap diff --git a/build/Dockerfile.rhtap b/build/Dockerfile.rhtap new file mode 100644 index 0000000..739e03c --- /dev/null +++ b/build/Dockerfile.rhtap @@ -0,0 +1,24 @@ +FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder + +WORKDIR go/src/open-cluster-management.io/multicloud-operators-channel +COPY . . +RUN make -f Makefile build + +FROM registry.access.redhat.com/ubi8/ubi-minimal:latest + +RUN microdnf update && \ + microdnf clean all + +ENV OPERATOR=/usr/local/bin/multicluster-operators-channel \ + USER_UID=1001 \ + USER_NAME=multicluster-operators-channel + +# install operator binary +COPY --from=builder go/src/open-cluster-management.io/multicloud-operators-channel/build/_output/bin/multicluster-operators-channel ${OPERATOR} + +COPY build/bin /usr/local/bin +RUN /usr/local/bin/user_setup + +ENTRYPOINT ["/usr/local/bin/entrypoint"] + +USER ${USER_UID}