Skip to content

Commit ff2511d

Browse files
selfisekaithe-maldridge
authored andcommitted
fixes for aarch64 containers
Closes: #5 [via git-merge-pr]
1 parent 9280ce3 commit ff2511d

7 files changed

Lines changed: 56 additions & 21 deletions

Dockerfile.bootstrap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ RUN apk add ca-certificates curl && \
77
curl ${REPOSITORY}/static/xbps-static-static-0.59_5.$(uname -m)-musl.tar.xz | \
88
tar vJx && \
99
rm -f /etc/ssl/certs/2e5ac55d.* && \
10-
if [[ "$ARCH" == "aarch64"* ]]; then export ARCH_DIR_PART='/aarch64'; fi; \
10+
if [ "${ARCH%-musl}" = "aarch64" ]; then \
11+
export REPOSITORIES="--repository=${REPOSITORY}/current/aarch64"; \
12+
elif [[ "${ARCH}" = "*-musl" ]]; then \
13+
export REPOSITORIES="--repository=${REPOSITORY}/current/musl"; \
14+
else \
15+
export REPOSITORIES="--repository=${REPOSITORY}/current"; \
16+
fi; \
1117
XBPS_ARCH=${ARCH} xbps-install.static -yMU \
12-
--repository=${REPOSITORY}/current${ARCH_DIR_PART} \
13-
--repository=${REPOSITORY}/current${ARCH_DIR_PART}/musl \
18+
$REPOSITORIES \
1419
-r /target \
1520
base-minimal
1621

Dockerfile.full

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ COPY keys/* /target/var/db/xbps/keys/
55
ARG REPOSITORY=https://repo-us.voidlinux.org
66
ARG ARCH=x86_64
77
RUN \
8-
if [[ "$ARCH" == "aarch64"* ]]; then export ARCH_DIR_PART='/aarch64'; fi; \
8+
if [ "${ARCH%-musl}" = "aarch64" ]; then \
9+
export REPOSITORIES="--repository=${REPOSITORY}/current/aarch64"; \
10+
elif [[ "${ARCH}" = "*-musl" ]]; then \
11+
export REPOSITORIES="--repository=${REPOSITORY}/current/musl"; \
12+
else \
13+
export REPOSITORIES="--repository=${REPOSITORY}/current"; \
14+
fi; \
915
XBPS_ARCH=${ARCH} xbps-install -yMUS \
10-
--repository=${REPOSITORY}/current${ARCH_DIR_PART} \
11-
--repository=${REPOSITORY}/current${ARCH_DIR_PART}/musl \
16+
$REPOSITORIES \
1217
-r /target \
1318
base-minimal
1419

Dockerfile.masterdir

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ COPY keys/* /target/var/db/xbps/keys/
55
ARG REPOSITORY=https://repo-us.voidlinux.org
66
ARG ARCH=x86_64
77
RUN \
8-
if [[ "$ARCH" == "aarch64"* ]]; then export ARCH_DIR_PART='/aarch64'; fi; \
8+
if [ "${ARCH%-musl}" = "aarch64" ]; then \
9+
export REPOSITORIES="--repository=${REPOSITORY}/current/aarch64"; \
10+
elif [[ "${ARCH}" = "*-musl" ]]; then \
11+
export REPOSITORIES="--repository=${REPOSITORY}/current/musl"; \
12+
else \
13+
export REPOSITORIES="--repository=${REPOSITORY}/current"; \
14+
fi; \
915
XBPS_ARCH=${ARCH} xbps-install -yMUS \
10-
--repository=${REPOSITORY}/current${ARCH_DIR_PART} \
11-
--repository=${REPOSITORY}/current${ARCH_DIR_PART}/musl \
16+
$REPOSITORIES \
1217
-r /target \
1318
base-chroot chroot-curl
1419

Dockerfile.mini

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ COPY noextract.conf /target/etc/xbps.d/noextract.conf
66
ARG REPOSITORY=https://repo-us.voidlinux.org
77
ARG ARCH=x86_64
88
RUN \
9-
if [[ "$ARCH" == "aarch64"* ]]; then export ARCH_DIR_PART='/aarch64'; fi; \
9+
if [ "${ARCH%-musl}" = "aarch64" ]; then \
10+
export REPOSITORIES="--repository=${REPOSITORY}/current/aarch64"; \
11+
elif [[ "${ARCH}" = "*-musl" ]]; then \
12+
export REPOSITORIES="--repository=${REPOSITORY}/current/musl"; \
13+
else \
14+
export REPOSITORIES="--repository=${REPOSITORY}/current"; \
15+
fi; \
1016
XBPS_ARCH=${ARCH} xbps-install -yMU \
11-
--repository=${REPOSITORY}/current${ARCH_DIR_PART} \
12-
--repository=${REPOSITORY}/current${ARCH_DIR_PART}/musl \
17+
$REPOSITORIES \
1318
-r /target \
1419
xbps base-files dash coreutils grep run-parts sed gawk && \
1520
rm -rf /target/var/cache/

Dockerfile.mini-bb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ COPY noextract.conf /target/etc/xbps.d/noextract.conf
66
ARG REPOSITORY=https://repo-us.voidlinux.org
77
ARG ARCH=x86_64
88
RUN \
9-
if [[ "$ARCH" == "aarch64"* ]]; then export ARCH_DIR_PART='/aarch64'; fi; \
9+
if [ "${ARCH%-musl}" = "aarch64" ]; then \
10+
export REPOSITORIES="--repository=${REPOSITORY}/current/aarch64"; \
11+
elif [[ "${ARCH}" = "*-musl" ]]; then \
12+
export REPOSITORIES="--repository=${REPOSITORY}/current/musl"; \
13+
else \
14+
export REPOSITORIES="--repository=${REPOSITORY}/current"; \
15+
fi; \
1016
XBPS_ARCH=${ARCH} xbps-install -yMU \
11-
--repository=${REPOSITORY}/current${ARCH_DIR_PART} \
12-
--repository=${REPOSITORY}/current${ARCH_DIR_PART}/musl \
17+
$REPOSITORIES \
1318
-r /target \
1419
xbps base-files busybox-huge && \
1520
rm -rf /target/var/cache/

Dockerfile.thin

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ COPY noextract.conf /target/etc/xbps.d/noextract.conf
66
ARG REPOSITORY=https://repo-us.voidlinux.org
77
ARG ARCH=x86_64
88
RUN \
9-
if [[ "$ARCH" == "aarch64"* ]]; then export ARCH_DIR_PART='/aarch64'; fi; \
9+
if [ "${ARCH%-musl}" = "aarch64" ]; then \
10+
export REPOSITORIES="--repository=${REPOSITORY}/current/aarch64"; \
11+
elif [[ "${ARCH}" = "*-musl" ]]; then \
12+
export REPOSITORIES="--repository=${REPOSITORY}/current/musl"; \
13+
else \
14+
export REPOSITORIES="--repository=${REPOSITORY}/current"; \
15+
fi; \
1016
XBPS_ARCH=${ARCH} xbps-install -yMU \
11-
--repository=${REPOSITORY}/current${ARCH_DIR_PART} \
12-
--repository=${REPOSITORY}/current${ARCH_DIR_PART}/musl \
17+
$REPOSITORIES \
1318
-r /target \
1419
xbps base-files dash coreutils grep run-parts sed gawk && \
1520
rm -rf /target/var/cache/

Dockerfile.thin-bb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ COPY noextract.conf /target/etc/xbps.d/noextract.conf
66
ARG REPOSITORY=https://repo-us.voidlinux.org
77
ARG ARCH=x86_64
88
RUN \
9-
if [[ "$ARCH" == "aarch64"* ]]; then export ARCH_DIR_PART='/aarch64'; fi; \
9+
if [ "${ARCH%-musl}" = "aarch64" ]; then \
10+
export REPOSITORIES="--repository=${REPOSITORY}/current/aarch64"; \
11+
elif [[ "${ARCH}" = "*-musl" ]]; then \
12+
export REPOSITORIES="--repository=${REPOSITORY}/current/musl"; \
13+
else \
14+
export REPOSITORIES="--repository=${REPOSITORY}/current"; \
15+
fi; \
1016
XBPS_ARCH=${ARCH} xbps-install -yMU \
11-
--repository=${REPOSITORY}/current${ARCH_DIR_PART} \
12-
--repository=${REPOSITORY}/current${ARCH_DIR_PART}/musl \
17+
$REPOSITORIES \
1318
-r /target \
1419
xbps base-files busybox-huge && \
1520
rm -rf /target/var/cache/

0 commit comments

Comments
 (0)