diff --git a/Dockerfile-386 b/Dockerfile-386 new file mode 100644 index 0000000..cce276b --- /dev/null +++ b/Dockerfile-386 @@ -0,0 +1,23 @@ +FROM 386/alpine + +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 && \ + 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/Dockerfile-amd64 b/Dockerfile-amd64 new file mode 100644 index 0000000..e85512d --- /dev/null +++ b/Dockerfile-amd64 @@ -0,0 +1,23 @@ +FROM amd64/alpine + +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 && \ + 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/Dockerfile-arm32v7 b/Dockerfile-arm32v7 new file mode 100644 index 0000000..682087f --- /dev/null +++ b/Dockerfile-arm32v7 @@ -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-arm.tar.gz +RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1 + +FROM arm32v7/alpine + +COPY --from=builder qemu-arm-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 && \ + 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/pre_build b/hooks/pre_build new file mode 100644 index 0000000..0a94f7e --- /dev/null +++ b/hooks/pre_build @@ -0,0 +1,5 @@ +#!/bin/bash + +# 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