Skip to content

Commit

Permalink
WIP: Install crictl from RPM
Browse files Browse the repository at this point in the history
  • Loading branch information
frobware committed Sep 5, 2024
1 parent eeb144f commit c05a225
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Containerfile.bpfman-agent.openshift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Build the manager binary
ARG BUILDPLATFORM=linux/amd64

FROM --platform=$BUILDPLATFORM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22.5-202407301806.g4c8b32d.el9 AS bpfman-agent-build

# The following ARGs are set internally by docker/build-push-action in github actions
Expand All @@ -22,7 +20,7 @@ COPY . .
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -mod vendor -o bpfman-agent ./cmd/bpfman-agent/main.go

FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9/ubi-minimal:9.4-1194
FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9/ubi:9.4
ARG DNF_CMD="microdnf"

ARG TARGETARCH
Expand All @@ -31,13 +29,12 @@ ARG TARGETPLATFORM
WORKDIR /
COPY --from=bpfman-agent-build /usr/src/bpfman-operator/bpfman-agent .

# Install crictl
RUN ${DNF_CMD} -y install wget tar gzip ca-certificates
ARG VERSION="v1.31.0"
RUN wget https://github.com/kubernetes-sigs/cri-tools/releases/download/${VERSION}/crictl-${VERSION}-linux-${TARGETARCH}.tar.gz
RUN tar zxvf crictl-${VERSION}-linux-${TARGETARCH}.tar.gz -C /usr/local/bin
RUN rm -f crictl-${VERSION}-linux-${TARGETARCH}.tar.gz
RUN ${DNF_CMD} -y clean all
RUN ls -lR /etc/pki

RUN subscription-manager repos --enable=rhocp-4_DOT_17-for-rhel-9-x86_64-rpms

RUN ${DNF_CMD} -y install wget tar gzip ca-certificates cri-tools && \
${DNF_CMD} -y clean all

LABEL name="bpfman/bpfman-agent" \
com.redhat.component="bpfman-agent" \
Expand Down

0 comments on commit c05a225

Please sign in to comment.