Skip to content

Commit c3b17aa

Browse files
authored
Merge pull request #1569 from dankova22/stunnel-fix
Upgrade python distro and create symlink to stunnel5
2 parents 3fa0b0f + 5116032 commit c3b17aa

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ENV EFS_CLIENT_SOURCE=$client_source
2828

2929
RUN OS=${TARGETOS} ARCH=${TARGETARCH} make $TARGETOS/$TARGETARCH
3030

31-
FROM public.ecr.aws/eks-distro-build-tooling/python:3.9.14-gcc-al2 as rpm-provider
31+
FROM public.ecr.aws/eks-distro-build-tooling/python:3.11-gcc-al23 as rpm-provider
3232

3333
# Install efs-utils from github by default. It can be overriden to `yum` with --build-arg when building the Docker image.
3434
# If value of `EFSUTILSSOURCE` build arg is overriden with `yum`, docker will install efs-utils from Amazon Linux 2's yum repo.
@@ -38,7 +38,7 @@ RUN mkdir -p /tmp/rpms && \
3838
then echo "Installing efs-utils from Amazon Linux 2 yum repo" && \
3939
yum -y install --downloadonly --downloaddir=/tmp/rpms amazon-efs-utils-1.35.0-1.amzn2.noarch; \
4040
else echo "Installing efs-utils from github using the latest git tag" && \
41-
yum -y install systemd git rpm-build make openssl-devel curl && \
41+
yum -y install systemd git rpm-build make openssl-devel curl && \
4242
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
4343
source $HOME/.cargo/env && \
4444
rustup update && \
@@ -55,28 +55,30 @@ RUN mkdir -p /tmp/rpms && \
5555
RUN pip3 install --user botocore
5656

5757
# This image is equivalent to the eks-distro-minimal-base-python image but with pip installed as well
58-
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-python-builder:3.9.14-al2 as rpm-installer
58+
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-python-builder:3.11-al23 as rpm-installer
5959

6060
COPY --from=rpm-provider /tmp/rpms/* /tmp/download/
6161

6262
# second param indicates to skip installing dependency rpms, these will be installed manually
6363
# cd, ls, cat, vim, tcpdump, are for debugging
6464
RUN clean_install amazon-efs-utils true && \
65+
clean_install crypto-policies true && \
6566
install_binary \
6667
/usr/bin/cat \
6768
/usr/bin/cd \
6869
/usr/bin/df \
6970
/usr/bin/env \
7071
/usr/bin/find \
7172
/usr/bin/grep \
73+
/usr/bin/ln \
7274
/usr/bin/ls \
7375
/usr/bin/mount \
7476
/usr/bin/umount \
7577
/sbin/mount.nfs4 \
7678
/usr/bin/openssl \
7779
/usr/bin/sed \
7880
/usr/bin/stat \
79-
/usr/bin/stunnel5 \
81+
/usr/bin/stunnel \
8082
/usr/sbin/tcpdump \
8183
/usr/bin/which && \
8284
cleanup "efs-csi"
@@ -88,12 +90,15 @@ RUN clean_install amazon-efs-utils true && \
8890
# Those static files need to be copied back to the config directory when the driver starts up.
8991
RUN mv /newroot/etc/amazon/efs /newroot/etc/amazon/efs-static-files
9092

91-
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-python:3.9.14-al2 AS linux-amazon
93+
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-python:3.11-al23 AS linux-amazon
9294

9395
COPY --from=rpm-installer /newroot /
94-
COPY --from=rpm-provider /root/.local/lib/python3.9/site-packages/ /usr/lib/python3.9/site-packages/
96+
COPY --from=rpm-provider /root/.local/lib/python3.11/site-packages/ /usr/lib/python3.11/site-packages/
9597

9698
COPY --from=go-builder /go/src/github.com/kubernetes-sigs/aws-efs-csi-driver/bin/aws-efs-csi-driver /bin/aws-efs-csi-driver
9799
COPY THIRD-PARTY /
98100

101+
# Create a symbolic link for stunnel5 to stunnel (for backward compatibility)
102+
RUN if [ -f /usr/bin/stunnel ]; then ln -s /usr/bin/stunnel /usr/bin/stunnel5; fi
103+
99104
ENTRYPOINT ["/bin/aws-efs-csi-driver"]

0 commit comments

Comments
 (0)