Skip to content

Commit 4b38684

Browse files
author
David Personette
committed
Dockerfile.aarch64/armhf hooks - update the crossbuild method
1 parent e062599 commit 4b38684

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

Dockerfile.aarch64

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM balenalib/aarch64-alpine
1+
FROM arm64v8/alpine
2+
COPY qemu-aarch64-static /usr/bin/
23
MAINTAINER David Personette <[email protected]>
34

45
# Install transmission
5-
RUN ["cross-build-start"]
66
RUN apk --no-cache --no-progress upgrade && \
77
apk --no-cache --no-progress add bash curl shadow sed tini \
88
transmission-daemon tzdata && \
@@ -37,7 +37,6 @@ RUN apk --no-cache --no-progress upgrade && \
3737
/bin/echo -e ' "upload-limit-enabled": 0\n}' >>$file && \
3838
chown -Rh transmission. $dir && \
3939
rm -rf /tmp/*
40-
RUN ["cross-build-end"]
4140

4241
COPY transmission.sh /usr/bin/
4342

Dockerfile.armhf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM balenalib/armv7hf-alpine
1+
FROM arm32v6/alpine
2+
COPY qemu-arm-static /usr/bin/
23
MAINTAINER David Personette <[email protected]>
34

45
# Install transmission
5-
RUN ["cross-build-start"]
66
RUN apk --no-cache --no-progress upgrade && \
77
apk --no-cache --no-progress add bash curl shadow sed tini \
88
transmission-daemon tzdata && \
@@ -37,7 +37,6 @@ RUN apk --no-cache --no-progress upgrade && \
3737
/bin/echo -e ' "upload-limit-enabled": 0\n}' >>$file && \
3838
chown -Rh transmission. $dir && \
3939
rm -rf /tmp/*
40-
RUN ["cross-build-end"]
4140

4241
COPY transmission.sh /usr/bin/
4342

hooks/post_checkout

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
[[ "${DOCKER_TAG}" == "latest" ]] && \
4+
{ echo 'qemu-user-static: Download not required for this arch'; exit 0; }
5+
6+
TAGS_API="https://api.github.com/repos/multiarch/qemu-user-static/tags"
7+
URL="https://github.com/multiarch/qemu-user-static/releases/download"
8+
LATEST_TAG=$(curl -Ls $TAGS_API | \
9+
awk -F'"' '/name.*v[0-9]/ {print $4; exit}')
10+
ARCH=$([[ "${DOCKER_TAG}" == "armhf" ]] && \
11+
echo "${DOCKER_TAG::-2}" || echo "${DOCKER_TAG}")
12+
13+
curl -Ls "${URL}/${LATEST_TAG}/x86_64_qemu-${ARCH}-static.tar.gz" | \
14+
tar xzv

hooks/pre_build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
[[ "${DOCKER_TAG}" == "latest" ]] && \
4+
{ echo 'qemu-user-static: Registration not required for this arch';exit 0; }
5+
6+
docker run --rm --privileged multiarch/qemu-user-static:register --reset

0 commit comments

Comments
 (0)