diff --git a/Dockerfile-arm64v8 b/Dockerfile-arm64v8 new file mode 100644 index 0000000..17d1c84 --- /dev/null +++ b/Dockerfile-arm64v8 @@ -0,0 +1,30 @@ +FROM alpine AS builder + +ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v4.0.0%2Bbalena2/qemu-4.0.0.balena2-aarch64.tar.gz +RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1 + +FROM arm64v8/alpine + +COPY --from=builder qemu-aarch64-static /usr/bin + +COPY compile.sh /tmp/compile.sh +RUN chmod +x /tmp/compile.sh && \ + /tmp/compile.sh && \ + rm -rf /tmp/* + +COPY entrypoint.sh /opt/entrypoint.sh +COPY confs/ /opt/confs +COPY scripts/ /opt/scripts +COPY fail2ban/ /opt/fail2ban +COPY logs/ /opt/logs + +RUN apk --no-cache add php7-fpm certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog && \ + chmod +x /opt/entrypoint.sh /opt/scripts/* && \ + mkdir /opt/entrypoint.d && \ + adduser -h /dev/null -g '' -s /sbin/nologin -D -H nginx + +VOLUME /www /http-confs /server-confs /modsec-confs /modsec-crs-confs + +EXPOSE 80/tcp 443/tcp + +ENTRYPOINT ["/opt/entrypoint.sh"] diff --git a/hooks/post_push b/hooks/post_push index 30f4df8..ae20c81 100644 --- a/hooks/post_push +++ b/hooks/post_push @@ -3,4 +3,8 @@ curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64 chmod +x manifest-tool -./manifest-tool push from-spec multi-arch-manifest.yaml +if [ "$SOURCE_BRANCH" = "dev" ] ; then + ./manifest-tool push from-spec multi-arch-manifest-dev.yaml +elif [ "$SOURCE_BRANCH" = "master" ] ; then + ./manifest-tool push from-spec multi-arch-manifest-master.yaml +fi diff --git a/multi-arch-manifest.yaml b/multi-arch-manifest-dev.yaml similarity index 75% rename from multi-arch-manifest.yaml rename to multi-arch-manifest-dev.yaml index 8abedea..8682028 100644 --- a/multi-arch-manifest.yaml +++ b/multi-arch-manifest-dev.yaml @@ -9,6 +9,11 @@ manifests: architecture: arm os: linux variant: v7 + - image: bunkerity/bunkerized-nginx:dev-arm64v8 + platform: + architecture: arm64 + os: linux + variant: v8 - image: bunkerity/bunkerized-nginx:dev-i386 platform: architecture: 386 diff --git a/multi-arch-manifest-master.yaml b/multi-arch-manifest-master.yaml new file mode 100644 index 0000000..253945d --- /dev/null +++ b/multi-arch-manifest-master.yaml @@ -0,0 +1,21 @@ +image: bunkerity/bunkerized-nginx:master +manifests: + - image: bunkerity/bunkerized-nginx:amd64 + platform: + architecture: amd64 + os: linux + - image: bunkerity/bunkerized-nginx:arm32v7 + platform: + architecture: arm + os: linux + variant: v7 + - image: bunkerity/bunkerized-nginx:arm64v8 + platform: + architecture: arm64 + os: linux + variant: v8 + - image: bunkerity/bunkerized-nginx:i386 + platform: + architecture: 386 + os: linux +