Skip to content

Commit c05a225

Browse files
committed
WIP: Install crictl from RPM
1 parent eeb144f commit c05a225

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

Containerfile.bpfman-agent.openshift

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# Build the manager binary
2-
ARG BUILDPLATFORM=linux/amd64
3-
42
FROM --platform=$BUILDPLATFORM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22.5-202407301806.g4c8b32d.el9 AS bpfman-agent-build
53

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

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

2826
ARG TARGETARCH
@@ -31,13 +29,12 @@ ARG TARGETPLATFORM
3129
WORKDIR /
3230
COPY --from=bpfman-agent-build /usr/src/bpfman-operator/bpfman-agent .
3331

34-
# Install crictl
35-
RUN ${DNF_CMD} -y install wget tar gzip ca-certificates
36-
ARG VERSION="v1.31.0"
37-
RUN wget https://github.com/kubernetes-sigs/cri-tools/releases/download/${VERSION}/crictl-${VERSION}-linux-${TARGETARCH}.tar.gz
38-
RUN tar zxvf crictl-${VERSION}-linux-${TARGETARCH}.tar.gz -C /usr/local/bin
39-
RUN rm -f crictl-${VERSION}-linux-${TARGETARCH}.tar.gz
40-
RUN ${DNF_CMD} -y clean all
32+
RUN ls -lR /etc/pki
33+
34+
RUN subscription-manager repos --enable=rhocp-4_DOT_17-for-rhel-9-x86_64-rpms
35+
36+
RUN ${DNF_CMD} -y install wget tar gzip ca-certificates cri-tools && \
37+
${DNF_CMD} -y clean all
4138

4239
LABEL name="bpfman/bpfman-agent" \
4340
com.redhat.component="bpfman-agent" \

0 commit comments

Comments
 (0)