File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
2017ARG 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
Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ elif [ "${TARGET_ARCH}" = "aarch64" ]
9191then
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
9797else
9898 echo " Unsupported architecture ${TARGET_ARCH} "
@@ -113,8 +113,7 @@ echo DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME}
113113
114114echo -e " Building the docker build script for ${DOCKER_IMAGE_NAME_BASE} on ${DOCKER_INPUT_ARCHITECTURE} for Ubuntu $1 \n"
115115CMD_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) \
You can’t perform that action at this time.
0 commit comments