From: Bastien Wirtz Date: Thu, 21 May 2020 04:08:52 +0000 (-0700) Subject: Merge pull request #57 from Phill93/disable-directory-listing X-Git-Tag: 120405250~4 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=2b47d9146476b75734a1f1c3da957fa093294dce;hp=694274f005f0fe26a4fe79bece0865726af9af70;p=github%2Fbastienwirtz%2Fhomer.git Merge pull request #57 from Phill93/disable-directory-listing disable directory listing --- diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 new file mode 100644 index 0000000..3b18243 --- /dev/null +++ b/Dockerfile.arm32v7 @@ -0,0 +1,23 @@ +FROM alpine as qemu + +ARG QEMU_VERSION="v4.2.0-7" + +RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static && chmod +x qemu-arm-static + +FROM arm32v7/alpine:3.11 + +COPY --from=qemu qemu-arm-static /usr/bin/ +COPY ./ /www/ + +ENV USER darkhttpd +ENV GROUP darkhttpd +ENV GID 911 +ENV UID 911 + +RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ + apk add -U darkhttpd && \ + rm /usr/bin/qemu-arm-static + +USER darkhttpd + +ENTRYPOINT ["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 @@ +FROM alpine as qemu + +ARG QEMU_VERSION="v4.2.0-7" + +RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-aarch64-static && chmod +x qemu-aarch64-static + +FROM arm64v8/alpine:3.11 + +COPY --from=qemu qemu-aarch64-static /usr/bin/ +COPY ./ /www/ + +ENV USER darkhttpd +ENV GROUP darkhttpd +ENV GID 911 +ENV UID 911 + +RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ + apk add -U darkhttpd && \ + rm /usr/bin/qemu-aarch64-static + +USER darkhttpd + +ENTRYPOINT ["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 @@ +#!/bin/bash + +docker manifest push --purge b4bz/homer:latest +docker manifest create b4bz/homer:latest b4bz/homer:latest-amd64 b4bz/homer:latest-arm32v7 b4bz/homer:latest-arm64v8 +docker manifest annotate b4bz/homer:latest b4bz/homer:latest-arm32v7 --os linux --arch arm +docker manifest annotate b4bz/homer:latest b4bz/homer:latest-arm64v8 --os linux --arch arm64 --variant v8 +docker 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 @@ +#!/bin/bash + +# Update to docker-ee 18.x for manifests +apt-get -y update +apt-get -y --only-upgrade install docker-ee +# Register qemu-*-static for all supported processors except the +# current one, but also remove all registered binfmt_misc before +docker run --rm --privileged multiarch/qemu-user-static:register --reset \ No newline at end of file