Skip to content

Commit 9021a66

Browse files
author
Max Huebler
committed
Fix build issues and update .circleci config
1 parent 73f8b15 commit 9021a66

File tree

5 files changed

+32
-15
lines changed

5 files changed

+32
-15
lines changed

.circleci/config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2.1
44
executors:
55
vm:
66
machine:
7-
image: ubuntu-2204:current
7+
image: ubuntu-2404:current
88

99
jobs:
1010
build:
@@ -15,7 +15,8 @@ jobs:
1515
- run: docker info
1616
- run: uname -a
1717
# Register binfmt_misc targets for cross-building
18-
- run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97
18+
- run: docker run --privileged docker.io/linuxkit/binfmt:v1.1.0
19+
- run: make SUFFIX=
1920
- run: make
2021
- run: docker images
2122

@@ -25,7 +26,7 @@ jobs:
2526
steps:
2627
- checkout
2728
- run: docker info
28-
- run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97
29+
- run: docker run --privileged docker.io/linuxkit/binfmt:v1.1.0
2930
- run: make SUFFIX=
3031
- run: docker images
3132
- run: make tag SUFFIX=

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ set -e
1818
source vars.sh
1919

2020
for version in "${versions[@]}"; do
21-
docker build --build-arg ARCH="${ARCH}" --build-arg TAG="${TAG}" --pull -t "${IMAGE_NAME}:${version}${SUFFIX}" "${version}"
21+
docker build --platform "${PLATFORM}" --build-arg ARCH="${ARCH}" --build-arg TAG="${TAG}" --pull -t "${IMAGE_NAME}:${version}${SUFFIX}" "${version}"
2222
done

glibc/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG ARCH=""
22
ARG TAG="bookworm-slim"
3-
FROM ${ARCH}debian:${TAG}
3+
FROM docker.io/debian:${TAG}
44
ENV DEBIAN_FRONTEND=noninteractive
55

66
RUN \
@@ -31,7 +31,7 @@ RUN set -x \
3131
fi; \
3232
done
3333

34-
FROM ${ARCH}busybox:glibc
34+
FROM docker.io/${ARCH}busybox:glibc
3535
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
3636

3737
COPY --from=0 /rootfs /

uclibc/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG ARCH=""
22
ARG TAG="bookworm-slim"
3-
FROM ${ARCH}debian:${TAG}
3+
FROM docker.io/${ARCH}debian:${TAG}
44
ENV DEBIAN_FRONTEND=noninteractive
55

66
RUN \
@@ -30,7 +30,7 @@ RUN set -x \
3030
fi; \
3131
done
3232

33-
FROM ${ARCH}busybox:uclibc
33+
FROM docker.io/${ARCH}busybox:stable-uclibc
3434
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
3535

3636
COPY --from=0 /rootfs /

vars.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,32 @@
1616
[ "$#" -lt 3 ] && echo "Missing args: $0 {IMAGE_NAME} {ARCH} {SUFFIX} {VERSIONS}" && exit 2;
1717

1818
IMAGE_NAME="$1"; shift;
19-
ARCH="$1"; shift;
19+
INPUT_ARCH="$1"; shift;
2020
SUFFIX="$1"; shift;
2121
TAG="bookworm-slim"
22-
if [[ "${ARCH}" == "riscv64" ]]; then
23-
TAG="sid-slim"
24-
fi
22+
PLATFORM="linux/amd64"
2523

26-
if [[ -n "${ARCH}" ]]; then
27-
ARCH="${ARCH}/"
28-
fi
24+
case "${INPUT_ARCH}" in
25+
arm32v7)
26+
PLATFORM="linux/arm/v7"
27+
;;
28+
arm64v8)
29+
PLATFORM="linux/arm64"
30+
;;
31+
riscv64)
32+
PLATFORM="linux/riscv64"
33+
TAG="sid-slim"
34+
;;
35+
ppc64le)
36+
PLATFORM="linux/ppc64le"
37+
;;
38+
s390x)
39+
PLATFORM="linux/s390x"
40+
;;
41+
esac
42+
43+
# We use official images with --platform, so no prefix needed
44+
ARCH=""
2945

3046
versions=( "$@" )
3147
if [[ "${#versions[@]}" -eq 0 ]]; then

0 commit comments

Comments
 (0)