-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathkonflux.Containerfile
More file actions
75 lines (58 loc) · 2.58 KB
/
Copy pathkonflux.Containerfile
File metadata and controls
75 lines (58 loc) · 2.58 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM registry.access.redhat.com/ubi9/ubi-micro@sha256:f332c99eb8f798a8486821c91937f10ad64ee83d7e739303be2df051040918f6 AS ubi-micro-base
FROM registry.access.redhat.com/ubi9/ubi@sha256:25a147defd01e19674714f55d17538c8dbe55d8c305fa157ecc3f9c8977b05b6 AS package_installer
COPY --from=ubi-micro-base / /out/
RUN dnf install -y \
--installroot=/out/ \
--releasever=9 \
--setopt=install_weak_deps=False \
--setopt=reposdir=/etc/yum.repos.d \
--nodocs \
ca-certificates \
crypto-policies-scripts \
gzip \
less \
openssl-libs \
tar && \
dnf clean all --installroot=/out/ && \
rm -rf /out/var/cache/dnf /out/var/cache/yum
FROM registry.access.redhat.com/ubi9/ubi@sha256:25a147defd01e19674714f55d17538c8dbe55d8c305fa157ecc3f9c8977b05b6 AS builder
ARG FACT_TAG
RUN echo "Checking required FACT_TAG"; [[ "${FACT_TAG}" != "" ]]
RUN dnf install --allowerasing -y \
clang \
libbpf-devel \
openssl-devel \
protobuf-compiler \
protobuf-devel \
cargo \
rust
WORKDIR /app
COPY . .
RUN cargo build --release
FROM ubi-micro-base
ARG FACT_TAG
LABEL \
com.redhat.component="rhacs-fact-container" \
com.redhat.license_terms="https://www.redhat.com/agreements" \
description="This image supports file activity data collection for Red Hat Advanced Cluster Security for Kubernetes" \
distribution-scope="public" \
io.k8s.description="This image supports file activity data collection for Red Hat Advanced Cluster Security for Kubernetes" \
io.k8s.display-name="fact" \
io.openshift.tags="rhacs,fact,stackrox" \
maintainer="Red Hat, Inc." \
name="advanced-cluster-security/rhacs-fact-rhel9" \
# Custom Snapshot creation in `operator-bundle-pipeline` depends on source-location label to be set correctly.
source-location="https://github.com/stackrox/fact" \
summary="File activity data collection for Red Hat Advanced Cluster Security for Kubernetes" \
url="https://catalog.redhat.com/software/container-stacks/detail/60eefc88ee05ae7c5b8f041c" \
vendor="Red Hat, Inc." \
# We must set version label for EC and to prevent inheriting value set in the base stage.
version="${FACT_TAG}" \
# Release label is required by EC although has no practical semantics.
# We also set it to not inherit one from a base stage in case it's RHEL or UBI.
release="1"
COPY --from=package_installer /out/ /
COPY --from=builder /app/target/release/fact /usr/local/bin
COPY LICENSE-APACHE LICENSE-MIT LICENSE-GPL2 /licenses/
RUN update-crypto-policies --set DEFAULT:PQ
ENTRYPOINT ["fact"]