Dockerfile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM nginxproxymanager/testca AS testca
  2. FROM letsencrypt/pebble AS pebbleca
  3. FROM nginxproxymanager/nginx-full:certbot-node
  4. LABEL maintainer="Jamie Curnow <[email protected]>"
  5. SHELL ["/bin/bash", "-o", "pipefail", "-c"]
  6. ENV SUPPRESS_NO_CONFIG_WARNING=1 \
  7. S6_BEHAVIOUR_IF_STAGE2_FAILS=1 \
  8. S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
  9. S6_FIX_ATTRS_HIDDEN=1 \
  10. S6_KILL_FINISH_MAXTIME=10000 \
  11. S6_VERBOSITY=2 \
  12. NODE_OPTIONS="--openssl-legacy-provider"
  13. RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
  14. && apt-get update \
  15. && apt-get install -y jq python3-pip logrotate \
  16. && apt-get clean \
  17. && rm -rf /var/lib/apt/lists/*
  18. # Task
  19. WORKDIR /usr
  20. RUN curl -sL https://taskfile.dev/install.sh | sh
  21. WORKDIR /root
  22. COPY rootfs /
  23. COPY scripts/install-s6 /tmp/install-s6
  24. RUN rm -f /etc/nginx/conf.d/production.conf \
  25. && chmod 644 /etc/logrotate.d/nginx-proxy-manager \
  26. && /tmp/install-s6 "${TARGETPLATFORM}" \
  27. && rm -f /tmp/install-s6 \
  28. && chmod 644 -R /root/.cache
  29. # Certs for testing purposes
  30. COPY --from=pebbleca /test/certs/pebble.minica.pem /etc/ssl/certs/pebble.minica.pem
  31. COPY --from=testca /home/step/certs/root_ca.crt /etc/ssl/certs/NginxProxyManager.crt
  32. EXPOSE 80 81 443
  33. ENTRYPOINT [ "/init" ]