Skip to content

Commit 890e0ad

Browse files
Fix arm64 build
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
1 parent 4fce7f3 commit 890e0ad

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

package-system/sdformat/Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@
1313
# Therefore it is better to not declare ARG instructions that are not used as part for the FROM instruction
1414
# until after it
1515
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
16-
# The cpu architecture to base the docker base script from
17-
ARG INPUT_ARCHITECTURE=amd64
18-
1916
# The root to base the docker script base from
2017
ARG INPUT_IMAGE=ubuntu:22.04
2118

22-
FROM ${INPUT_ARCHITECTURE}/${INPUT_IMAGE}
19+
FROM ${INPUT_IMAGE}
2320

2421
# NOTE: Now it is safe to declare ARG instructions that are used in the build stage
2522
# of the image

package-system/sdformat/build-linux.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ elif [ "${TARGET_ARCH}" = "aarch64" ]
9191
then
9292
echo "Processing Docker for aarch64"
9393

94-
DOCKER_INPUT_ARCHITECTURE=arm64v8
95-
TARGET_DOCKER_PLATFORM_ARG=linux/arm64/v8
94+
DOCKER_INPUT_ARCHITECTURE=arm64
95+
TARGET_DOCKER_PLATFORM_ARG=linux/arm64
9696

9797
else
9898
echo "Unsupported architecture ${TARGET_ARCH}"
@@ -113,8 +113,7 @@ echo DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME}
113113

114114
echo -e "Building the docker build script for ${DOCKER_IMAGE_NAME_BASE} on ${DOCKER_INPUT_ARCHITECTURE} for Ubuntu $1\n"
115115
CMD_DOCKER_BUILD="\
116-
docker build --build-arg INPUT_DOCKER_BUILD_SCRIPT=${DOCKER_BUILD_SCRIPT}\
117-
--build-arg INPUT_ARCHITECTURE=${DOCKER_INPUT_ARCHITECTURE}\
116+
docker build --platform ${TARGET_DOCKER_PLATFORM_ARG} --build-arg INPUT_DOCKER_BUILD_SCRIPT=${DOCKER_BUILD_SCRIPT}\
118117
--build-arg INPUT_IMAGE=ubuntu:${UBUNTU_BASE}\
119118
--build-arg INPUT_DEPENDENT_PACKAGE_FOLDERS=${DOWNLOADED_PACKAGE_FOLDERS}\
120119
--build-arg USER_ID=$(id -u)\

0 commit comments

Comments
 (0)