Skip to content

Commit 0473bab

Browse files
committed
Switch to Docker --platform
1 parent 0b160ba commit 0473bab

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

ci/build-in-docker.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ this_dir="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
2828

2929
case "$ARCH" in
3030
x86_64)
31-
docker_arch=amd64
31+
docker_platform=linux/amd64
3232
;;
3333
i386)
34-
docker_arch=i386
34+
docker_platform=linux/386
3535
;;
3636
armhf)
37-
docker_arch=arm32v7
37+
docker_platform=linux/arm/v7
3838
;;
3939
aarch64)
40-
docker_arch=arm64v8
40+
docker_platform=linux/arm64/v8
4141
;;
4242
*)
4343
echo "Unsupported \$ARCH: $ARCH"
@@ -48,7 +48,7 @@ esac
4848
# first, we need to build the image
4949
# we always attempt to build it, it will only be rebuilt if Docker detects changes
5050
# optionally, we'll pull the base image beforehand
51-
info "Building Docker image for $ARCH (Docker arch: $docker_arch)"
51+
info "Building Docker image for $ARCH (Docker platform: $docker_platform)"
5252

5353
build_args=()
5454
if [[ "${UPDATE:-}" == "" ]]; then
@@ -57,11 +57,11 @@ else
5757
build_args+=("--pull")
5858
fi
5959

60-
image_tag="linuxdeploy-build:$ARCH"
60+
image_tag="linuxdeploy-build"
6161

6262
docker build \
6363
--build-arg ARCH="$ARCH" \
64-
--build-arg docker_arch="$docker_arch" \
64+
--platform "$docker_platform" \
6565
"${build_args[@]}" \
6666
-t "$image_tag" \
6767
"$this_dir"/docker

ci/docker/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
# needs to be re-run in CI every time as we cannot store auto-built Docker images due to GitHub's strict quota
44
# it will save a lot of time in local development environments, though
55

6-
ARG docker_arch
7-
86
# we'll just use Debian as a base image for now, mainly because it produces less headache than Ubuntu with arm
97
# a big pro is that they ship an up to date CMake in their stable distribution
108
# also, they still provide IA-32 builds for some reason...
119
# some people in the AppImage community do not (want to) realize i386 is dead for good
1210
# we are going to drop i686 in the future!
13-
FROM ${docker_arch}/debian:stable
11+
FROM debian:stable
1412

1513
# variables that need to be availabe during build and runtime must(!) be repeated after FROM
1614
ARG ARCH

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy