forked from bpfman/bpfman
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathContainerfile.bpfman.openshift
More file actions
42 lines (33 loc) · 1.74 KB
/
Containerfile.bpfman.openshift
File metadata and controls
42 lines (33 loc) · 1.74 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
ARG BUILDVERSION
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest AS bpfman-build
ARG BUILDVERSION
ARG BUILD_COMMIT
WORKDIR /usr/src/bpfman
COPY ./ /usr/src/bpfman
# Install build dependencies using pre-fetched RPM packages for hermetic builds
RUN microdnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs \
gcc openssl-devel cmake clang-devel rust cargo libbpf-devel && microdnf clean all
# Compile bpfman cli, bpfman-ns, and bpfman-rpc binaries
RUN mkdir -p bin/
RUN : "${BUILD_COMMIT:=$(git rev-parse --short=10 HEAD 2>/dev/null || echo unknown)}" && \
BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" && \
RUSTC_VERSION="$(rustc --version)" && \
export BPFMAN_BUILD_INFO="${BUILDVERSION} (${BUILD_COMMIT} ${BUILD_DATE}) ${RUSTC_VERSION}" && \
cargo build --release
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
ARG BUILDVERSION
ARG CPE_VERSION
COPY --from=bpfman-build /usr/src/bpfman/target/release/bpfman .
COPY --from=bpfman-build /usr/src/bpfman/target/release/bpfman-ns .
COPY --from=bpfman-build /usr/src/bpfman/target/release/bpfman-rpc .
LABEL name="bpfman/bpfman" \
com.redhat.component="bpfman" \
io.k8s.display-name="Bpfman" \
summary="Bpfman manages the eBPF programs lifecycle." \
description="Bpfman operates as an eBPF programs manager, focusing on simplifying the deployment and administration of eBPF programs." \
io.k8s.description="Bpfman operates as an eBPF programs manager, focusing on simplifying the deployment and administration of eBPF programs." \
io.openshift.tags="bpfman" \
version=$BUILDVERSION \
cpe="cpe:/a:redhat:openshift_bpfman_operator:${CPE_VERSION}::el9" \
vendor="Red Hat, Inc."
ENTRYPOINT ["./bpfman-rpc", "--timeout=0"]