forked from openshift/file-integrity-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ci
29 lines (20 loc) · 843 Bytes
/
Dockerfile.ci
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
28
29
# Step one: build file-integrity-operator
FROM registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.22-openshift-4.17 AS builder
USER root
WORKDIR /go/src/github.com/openshift/file-integrity-operator
ENV GOFLAGS="-mod=vendor"
COPY . .
RUN make build
# Step two: containerize file-integrity-operator and AIDE together
FROM registry.fedoraproject.org/fedora-minimal:37
RUN microdnf -y install aide-0.16
RUN microdnf -y install aide golang && microdnf clean all
ENV OPERATOR=/usr/local/bin/file-integrity-operator \
USER_UID=1001 \
USER_NAME=file-integrity-operator
# install operator binary
COPY --from=builder /go/src/github.com/openshift/file-integrity-operator/build/bin/manager ${OPERATOR}
COPY build/bin /usr/local/bin
RUN /usr/local/bin/user_setup
ENTRYPOINT ["/usr/local/bin/entrypoint"]
USER ${USER_UID}