Skip to content

Commit

Permalink
feat(docker): make linux container support multi-arch builds
Browse files Browse the repository at this point in the history
Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
  • Loading branch information
AtomicFS committed Oct 11, 2024
1 parent 9c5fa6f commit 4fe8fd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# Docs: https://docs.docker.com/build/building/multi-stage/

ARG SOURCE_IMAGE=ubuntu:jammy
ARG TARGETARCH=amd64

#=============
# "base" stage with all needed build dependencies
FROM ${SOURCE_IMAGE} AS base

ARG TARGETARCH=amd64
ARG LINUX_VERSION=6.1.45
ARG CONTEXT=linux

Expand Down Expand Up @@ -65,7 +65,7 @@ RUN apt-get update && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 100 && \
update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-${GCC_VERSION} 100 && \
update-alternatives --install /usr/bin/arm-linux-gnueabi-gcc arm-linux-gnueabi-gcc /usr/bin/arm-linux-gnueabi-gcc-${GCC_VERSION} 100 && \
update-alternatives --install /usr/bin/i686-linux-gnu-gcc i686-linux-gnu-gcc /usr/bin/i686-linux-gnu-gcc-${GCC_VERSION} 100 && \
update-alternatives --install /usr/bin/i686-linux-gnu-gcc i686-linux-gnu-gcc /usr/bin/i686-linux-gnu-gcc-${GCC_VERSION} 100; \
gpg2 --locate-keys torvalds@kernel.org gregkh@kernel.org && \
rm -rf /var/lib/apt/lists/*

Expand Down
1 change: 1 addition & 0 deletions tests/test_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ fi
# Make
cd "${LINUX_BASE}"
cp "${SCRIPT_DIR}/linux_${VERIFICATION_TEST_LINUX_VERSION}/linux.defconfig" ./arch/x86/configs/ci_defconfig
cp "${SCRIPT_DIR}/linux_${VERIFICATION_TEST_LINUX_VERSION}/linux.defconfig" ./arch/arm64/configs/ci_defconfig
make ci_defconfig
make -j "$(nproc)"

0 comments on commit 4fe8fd2

Please sign in to comment.