diff options
-rw-r--r-- | Dockerfile.arm32v7 | 12 | ||||
-rw-r--r-- | Dockerfile.arm64v8 | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index e78d37c..d78d608 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 | |||
@@ -1,12 +1,13 @@ | |||
1 | FROM alpine AS builder | 1 | FROM alpine as qemu |
2 | 2 | ||
3 | # Download QEMU, see https://github.com/docker/hub-feedback/issues/1261 | 3 | ARG QEMU_VERSION "v4.2.0-7" |
4 | ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-aarch64.tar.gz | 4 | |
5 | RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1 | 5 | RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static && chmod +x qemu-arm-static |
6 | 6 | ||
7 | FROM arm32v7/alpine:3.11 | 7 | FROM arm32v7/alpine:3.11 |
8 | COPY --from=builder qemu-aarch64-static /usr/bin | 8 | COPY --from=builder qemu-aarch64-static /usr/bin |
9 | 9 | ||
10 | COPY --from=qemu qemu-arm-static /usr/bin/ | ||
10 | COPY ./ /www/ | 11 | COPY ./ /www/ |
11 | 12 | ||
12 | ENV USER darkhttpd | 13 | ENV USER darkhttpd |
@@ -15,7 +16,8 @@ ENV GID 911 | |||
15 | ENV UID 911 | 16 | ENV UID 911 |
16 | 17 | ||
17 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 18 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
18 | apk add -U darkhttpd | 19 | apk add -U darkhttpd && \ |
20 | rm /usr/bin/qemu-arm-static | ||
19 | 21 | ||
20 | USER darkhttpd | 22 | USER darkhttpd |
21 | 23 | ||
diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index 1e01245..b7c0484 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 | |||
@@ -1,12 +1,13 @@ | |||
1 | FROM alpine AS builder | 1 | FROM alpine as qemu |
2 | 2 | ||
3 | # Download QEMU, see https://github.com/docker/hub-feedback/issues/1261 | 3 | ARG QEMU_VERSION "v4.2.0-7" |
4 | ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-aarch64.tar.gz | 4 | |
5 | RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1 | 5 | RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-aarch64-static && chmod +x qemu-aarch64-static |
6 | 6 | ||
7 | FROM arm64v8/alpine:3.11 | 7 | FROM arm64v8/alpine:3.11 |
8 | COPY qemu-arm-static /usr/bin | 8 | COPY qemu-arm-static /usr/bin |
9 | 9 | ||
10 | COPY --from=qemu qemu-aarch64-static /usr/bin/ | ||
10 | COPY ./ /www/ | 11 | COPY ./ /www/ |
11 | 12 | ||
12 | ENV USER darkhttpd | 13 | ENV USER darkhttpd |
@@ -15,7 +16,8 @@ ENV GID 911 | |||
15 | ENV UID 911 | 16 | ENV UID 911 |
16 | 17 | ||
17 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 18 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
18 | apk add -U darkhttpd | 19 | apk add -U darkhttpd && \ |
20 | rm /usr/bin/qemu-aarch64-static | ||
19 | 21 | ||
20 | USER darkhttpd | 22 | USER darkhttpd |
21 | 23 | ||