Dockerfile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # This is a Dockerfile intended to be built using `docker buildx`
  2. # for multi-arch support. Building with `docker build` may have unexpected results.
  3. # This file assumes that the frontend has been built using ./scripts/frontend-build
  4. FROM jc21/nginx-full:node
  5. ARG TARGETPLATFORM
  6. ARG BUILD_VERSION
  7. ARG BUILD_COMMIT
  8. ARG BUILD_DATE
  9. ENV SUPPRESS_NO_CONFIG_WARNING=1 \
  10. S6_FIX_ATTRS_HIDDEN=1 \
  11. S6_BEHAVIOUR_IF_STAGE2_FAILS=1 \
  12. NODE_ENV=production \
  13. NPM_BUILD_VERSION="${BUILD_VERSION}" \
  14. NPM_BUILD_COMMIT="${BUILD_COMMIT}" \
  15. NPM_BUILD_DATE="${BUILD_DATE}"
  16. RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
  17. && apt-get update \
  18. && apt-get install -y --no-install-recommends jq logrotate \
  19. && apt-get clean \
  20. && rm -rf /var/lib/apt/lists/*
  21. # s6 overlay
  22. COPY scripts/install-s6 /tmp/install-s6
  23. RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6
  24. EXPOSE 80 81 443
  25. COPY backend /app
  26. COPY frontend/dist /app/frontend
  27. COPY global /app/global
  28. WORKDIR /app
  29. RUN yarn install
  30. # add late to limit cache-busting by modifications
  31. COPY docker/rootfs /
  32. # Remove frontend service not required for prod, dev nginx config as well
  33. RUN rm -rf /etc/services.d/frontend /etc/nginx/conf.d/dev.conf
  34. # Change permission of logrotate config file
  35. RUN chmod 644 /etc/logrotate.d/nginx-proxy-manager
  36. VOLUME [ "/data", "/etc/letsencrypt" ]
  37. ENTRYPOINT [ "/init" ]
  38. HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
  39. LABEL org.label-schema.schema-version="1.0" \
  40. org.label-schema.license="MIT" \
  41. org.label-schema.name="nginx-proxy-manager" \
  42. org.label-schema.description="Docker container for managing Nginx proxy hosts with a simple, powerful interface " \
  43. org.label-schema.url="https://github.com/jc21/nginx-proxy-manager" \
  44. org.label-schema.vcs-url="https://github.com/jc21/nginx-proxy-manager.git" \
  45. org.label-schema.cmd="docker run --rm -ti jc21/nginx-proxy-manager:latest"