-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile.ci
More file actions
31 lines (20 loc) · 982 Bytes
/
Dockerfile.ci
File metadata and controls
31 lines (20 loc) · 982 Bytes
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
# 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
# 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
ENTRYPOINT ["/usr/local/bin/entrypoint"]
USER 1001