Skip to content

Commit 1c56c07

Browse files
spotlesstofulittlejawa
authored andcommitted
dockerfile: comment out iptables-wrapper
We don't need it on RHEL because we know the iptables mode we support, nft. The wrapper provides an easy way to support both "legacy" and "nft" modes when you don't know the system the container will run in. RHEL only supports nft, so there is no point in supporting legacy through the wrapper. See docs at https://github.com/kubernetes-sigs/iptables-wrappers
1 parent 3628d91 commit 1c56c07

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

src/cloud-api-adaptor/Dockerfile.openshift

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ USER root
1919
# the build process assumes go is under "/go", so let's make sure it works
2020
RUN ln -s /opt/app-root/src/go /go
2121
RUN go install github.com/mikefarah/yq/v4@$YQ_VERSION
22-
2322
# This registering RHEL when building on an unsubscribed system
24-
# If you are running a UBI container on a registered and subscribed RHEL host,
23+
# If you are running a UBI container on a registered and subscribed RHEL host,
2524
# the main RHEL Server repository is enabled inside the standard UBI container.
2625
RUN if command -v subscription-manager; then \
2726
REPO_ARCH=$(uname -m) && \
@@ -63,19 +62,19 @@ ENV BUILTIN_CLOUD_PROVIDERS="strictfipsruntime aws azure ibmcloud vsphere libvir
6362
ENV PATH=/opt/app-root/src/go/bin:$PATH
6463
RUN CC=gcc make ARCH=$TARGETARCH COMMIT=$COMMIT VERSION=$VERSION RELEASE_BUILD=$RELEASE_BUILD cloud-api-adaptor
6564

66-
FROM builder-release AS iptables
67-
65+
# FROM builder-release AS iptables
66+
#
6867
#ARG TARGETARCH
69-
70-
WORKDIR /iptables
71-
ENV PATH=/opt/app-root/src/go/bin:$PATH
72-
RUN --mount=type=bind,target=/versions.yaml,source=cloud-api-adaptor/versions.yaml,readonly \
73-
version=$(yq -r .tools.iptables-wrapper /versions.yaml) && \
74-
GOARCH=$TARGETARCH go install "github.com/kubernetes-sigs/iptables-wrappers@$version" && \
75-
shopt -s globstar && \
76-
cp /go/bin/**/iptables-wrappers ./iptables-wrapper && \
77-
curl -L -o iptables-wrapper-installer.sh "https://raw.githubusercontent.com/kubernetes-sigs/iptables-wrappers/${version#v*-*-}/iptables-wrapper-installer.sh" && \
78-
chmod 755 iptables-wrapper-installer.sh
68+
#
69+
# WORKDIR /iptables
70+
# ENV PATH=/opt/app-root/src/go/bin:$PATH
71+
# RUN --mount=type=bind,target=/versions.yaml,source=cloud-api-adaptor/versions.yaml,readonly \
72+
# version=$(yq -r .tools.iptables-wrapper /versions.yaml) && \
73+
# GOARCH=$TARGETARCH go install "github.com/kubernetes-sigs/iptables-wrappers@$version" && \
74+
# shopt -s globstar && \
75+
# cp /go/bin/**/iptables-wrappers ./iptables-wrapper && \
76+
# curl -L -o iptables-wrapper-installer.sh "https://raw.githubusercontent.com/kubernetes-sigs/iptables-wrappers/${version#v*-*-}/iptables-wrapper-installer.sh" && \
77+
# chmod 755 iptables-wrapper-installer.sh
7978

8079
FROM registry.access.redhat.com/ubi9/ubi:9.5 AS base-release
8180
USER root
@@ -87,10 +86,9 @@ RUN if command -v subscription-manager; then \
8786
dnf -y install 'dnf-command(config-manager)' && dnf config-manager --enable crb; \
8887
fi
8988

90-
RUN dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y
91-
RUN dnf install -y iptables iptables-legacy iptables-nft nftables && dnf clean all
92-
RUN --mount=type=cache,target=/iptables,from=iptables,source=/iptables,readonly \
93-
cd /iptables && ./iptables-wrapper-installer.sh --no-sanity-check --no-cleanup
89+
RUN dnf install -y iptables iptables-nft nftables && dnf clean all
90+
# RUN --mount=type=cache,target=/iptables,from=iptables,source=/iptables,readonly \
91+
# cd /iptables && ./iptables-wrapper-installer.sh --no-sanity-check --no-cleanup
9492

9593
#FROM base-release AS base-dev
9694
RUN dnf install -y libvirt-libs /usr/bin/ssh && dnf clean all

0 commit comments

Comments
 (0)