forked from openshift/file-integrity-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.AIDE0.18.ci
31 lines (22 loc) · 957 Bytes
/
Dockerfile.AIDE0.18.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
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
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:latest
RUN microdnf -y install aide
RUN aide -v | grep -q '0.18' || (echo "Aide version is not 0.18 but $(aide -v)" && exit 1)
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 \
AIDE_VERSION=0.18
# 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}