aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Dockerfile.arm32v723
-rw-r--r--Dockerfile.arm64v823
-rw-r--r--hooks/post_push7
-rw-r--r--hooks/pre_build8
4 files changed, 61 insertions, 0 deletions
diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7
new file mode 100644
index 0000000..3b18243
--- /dev/null
+++ b/Dockerfile.arm32v7
@@ -0,0 +1,23 @@
1FROM alpine as qemu
2
3ARG QEMU_VERSION="v4.2.0-7"
4
5RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static && chmod +x qemu-arm-static
6
7FROM arm32v7/alpine:3.11
8
9COPY --from=qemu qemu-arm-static /usr/bin/
10COPY ./ /www/
11
12ENV USER darkhttpd
13ENV GROUP darkhttpd
14ENV GID 911
15ENV UID 911
16
17RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
18 apk add -U darkhttpd && \
19 rm /usr/bin/qemu-arm-static
20
21USER darkhttpd
22
23ENTRYPOINT ["darkhttpd","/www/"]
diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8
new file mode 100644
index 0000000..0845c34
--- /dev/null
+++ b/Dockerfile.arm64v8
@@ -0,0 +1,23 @@
1FROM alpine as qemu
2
3ARG QEMU_VERSION="v4.2.0-7"
4
5RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-aarch64-static && chmod +x qemu-aarch64-static
6
7FROM arm64v8/alpine:3.11
8
9COPY --from=qemu qemu-aarch64-static /usr/bin/
10COPY ./ /www/
11
12ENV USER darkhttpd
13ENV GROUP darkhttpd
14ENV GID 911
15ENV UID 911
16
17RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
18 apk add -U darkhttpd && \
19 rm /usr/bin/qemu-aarch64-static
20
21USER darkhttpd
22
23ENTRYPOINT ["darkhttpd","/www/"]
diff --git a/hooks/post_push b/hooks/post_push
new file mode 100644
index 0000000..d721b68
--- /dev/null
+++ b/hooks/post_push
@@ -0,0 +1,7 @@
1#!/bin/bash
2
3docker manifest push --purge b4bz/homer:latest
4docker manifest create b4bz/homer:latest b4bz/homer:latest-amd64 b4bz/homer:latest-arm32v7 b4bz/homer:latest-arm64v8
5docker manifest annotate b4bz/homer:latest b4bz/homer:latest-arm32v7 --os linux --arch arm
6docker manifest annotate b4bz/homer:latest b4bz/homer:latest-arm64v8 --os linux --arch arm64 --variant v8
7docker manifest push --purge b4bz/homer:latest \ No newline at end of file
diff --git a/hooks/pre_build b/hooks/pre_build
new file mode 100644
index 0000000..bc1b6fe
--- /dev/null
+++ b/hooks/pre_build
@@ -0,0 +1,8 @@
1#!/bin/bash
2
3# Update to docker-ee 18.x for manifests
4apt-get -y update
5apt-get -y --only-upgrade install docker-ee
6# Register qemu-*-static for all supported processors except the
7# current one, but also remove all registered binfmt_misc before
8docker run --rm --privileged multiarch/qemu-user-static:register --reset \ No newline at end of file