forked from openshift/file-integrity-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ci
More file actions
34 lines (23 loc) · 1.05 KB
/
Copy pathDockerfile.ci
File metadata and controls
34 lines (23 loc) · 1.05 KB
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
30
31
32
33
34
# 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
RUN dnf -y install libgcrypt-devel && dnf clean all && \
dnf -y clean all && rm -rf /var/cache/dnf
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 --from=builder /go/src/github.com/openshift/file-integrity-operator/build/guard/libaide_md5_guard.so /opt/libaide_md5_guard.so
COPY build/bin /usr/local/bin
RUN /usr/local/bin/user_setup
ENTRYPOINT ["/usr/local/bin/entrypoint"]
USER ${USER_UID}