forked from openshift/compliance-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ocp
27 lines (17 loc) · 725 Bytes
/
Dockerfile.ocp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Step one: build compliance-operator
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.17-openshift-4.10 AS builder
WORKDIR /go/src/github.com/openshift/compliance-operator
ENV GOFLAGS=-mod=vendor
COPY . .
RUN make manager
# Step two: containerize compliance-operator
FROM registry.access.redhat.com/ubi8/ubi-micro:latest
ENV OPERATOR=/usr/local/bin/compliance-operator \
USER_UID=1001 \
USER_NAME=compliance-operator
# install operator binary
COPY --from=builder /go/src/github.com/openshift/compliance-operator/build/_output/bin/compliance-operator ${OPERATOR}
COPY build/bin /usr/local/bin
RUN /usr/local/bin/user_setup
ENTRYPOINT ["/usr/local/bin/entrypoint"]
USER ${USER_UID}