aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-05-19 09:13:15 -0700
committerGitHub <noreply@github.com>2020-05-19 09:13:15 -0700
commite6701f57ccbd61bf479635061339aeaf44b56116 (patch)
treeedcfe3507d97e3fa3509c49cc4ed4ce1f6f2c7c4
parent55e0df5386b60935c3db568a94b70d4d6c0f0f49 (diff)
parentabe6df52b500199ff4b379e0370427267a16992b (diff)
downloadhomer-e6701f57ccbd61bf479635061339aeaf44b56116.tar.gz
homer-e6701f57ccbd61bf479635061339aeaf44b56116.tar.zst
homer-e6701f57ccbd61bf479635061339aeaf44b56116.zip
Merge pull request #49 from nightah/docker-multiarch-builds
Build multi-arch container with manifest
-rw-r--r--Dockerfile.arm32v715
-rw-r--r--Dockerfile.arm64v815
-rw-r--r--hooks/post_push7
-rw-r--r--hooks/pre_build8
4 files changed, 45 insertions, 0 deletions
diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7
new file mode 100644
index 0000000..79a7a61
--- /dev/null
+++ b/Dockerfile.arm32v7
@@ -0,0 +1,15 @@
1FROM arm32v7/alpine:3.11
2
3COPY ./ /www/
4
5ENV USER darkhttpd
6ENV GROUP darkhttpd
7ENV GID 911
8ENV UID 911
9
10RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
11 apk add -U darkhttpd
12
13USER darkhttpd
14
15ENTRYPOINT ["darkhttpd","/www/"]
diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8
new file mode 100644
index 0000000..707dd83
--- /dev/null
+++ b/Dockerfile.arm64v8
@@ -0,0 +1,15 @@
1FROM arm64v8/alpine:3.11
2
3COPY ./ /www/
4
5ENV USER darkhttpd
6ENV GROUP darkhttpd
7ENV GID 911
8ENV UID 911
9
10RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
11 apk add -U darkhttpd
12
13USER darkhttpd
14
15ENTRYPOINT ["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