feat(dx): add ld workaround (#254)

This commit is contained in:
Jorge O. Castro 2023-06-01 15:40:55 -04:00 committed by GitHub
parent 1c9c30b160
commit e6dd8dfe4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -57,6 +57,7 @@ ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
# dx specific files come from the dx directory in this repo
COPY dx/etc /etc
COPY dx/usr /usr
COPY workarounds.sh /tmp/workarounds.sh
RUN wget https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo
RUN wget https://terra.fyralabs.com/terra.repo -O /etc/yum.repos.d/terra.repo
@ -74,6 +75,8 @@ COPY --from=cgr.dev/chainguard/helm:latest /usr/bin/helm /usr/bin/helm
COPY --from=cgr.dev/chainguard/ko:latest /usr/bin/ko /usr/bin/ko
COPY --from=cgr.dev/chainguard/minio-client:latest /usr/bin/mc /usr/bin/mc
RUN /tmp/workarounds.sh
# Clean up repos, everything is on the image so we don't need them
RUN rm -f /etc/yum.repos.d/terra.repo
RUN rm -f /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo

6
workarounds.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
set -oeux pipefail
# alternatives cannot create symlinks on its own during a container build
ln -sf /usr/bin/ld.bfd /etc/alternatives/ld && ln -sf /etc/alternatives/ld /usr/bin/ld