dockerfiles: update packages for aarch64 to amd64 crosscompiles

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2024-07-11 19:29:28 -04:00
parent d7aeaebd00
commit 6705d485cc
2 changed files with 2 additions and 14 deletions

View File

@ -29,13 +29,7 @@ RUN apt-get install -y \
&& ln -s /usr/lib/go-1.21/bin/gofmt /usr/bin/gofmt
RUN if [ "$(uname -m)" = "aarch64" ]; then \
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse' > /etc/apt/sources.list.d/amd64.list; \
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse' >> /etc/apt/sources.list.d/amd64.list; \
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse' >> /etc/apt/sources.list.d/amd64.list; \
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse' >> /etc/apt/sources.list.d/amd64.list; \
apt-get update; \
dpkg --add-architecture amd64; \
apt-get install -y libc6:amd64 qemu-user-binfmt --no-install-recommends; \
apt-get install -y libc6-amd64-cross qemu-user-binfmt --no-install-recommends; \
fi
RUN rm -rf /var/lib/apt/lists/*

View File

@ -25,13 +25,7 @@ RUN apt-get install -y \
--no-install-recommends
RUN if [ "$(uname -m)" = "aarch64" ]; then \
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse' > /etc/apt/sources.list.d/amd64.list; \
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse' >> /etc/apt/sources.list.d/amd64.list; \
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse' >> /etc/apt/sources.list.d/amd64.list; \
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble-backports main restricted universe multiverse' >> /etc/apt/sources.list.d/amd64.list; \
apt-get update; \
dpkg --add-architecture amd64; \
apt-get install -y libc6:amd64 qemu-user-binfmt --no-install-recommends; \
apt-get install -y libc6-amd64-cross qemu-user-binfmt --no-install-recommends; \
fi
RUN rm -rf /var/lib/apt/lists/*