Dockerfile 990 B

123456789101112131415161718192021222324252627282930
  1. FROM uozi/nginx-ui-base:latest
  2. ARG TARGETOS
  3. ARG TARGETARCH
  4. ARG TARGETVARIANT
  5. EXPOSE 80 443
  6. ENV NGINX_UI_OFFICIAL_DOCKER=true
  7. ENV NGINX_UI_WORKING_DIR=/var/run/
  8. # register nginx-ui service
  9. COPY resources/docker/nginx-ui.run /etc/s6-overlay/s6-rc.d/nginx-ui/run
  10. RUN echo 'longrun' > /etc/s6-overlay/s6-rc.d/nginx-ui/type && \
  11. touch /etc/s6-overlay/s6-rc.d/user/contents.d/nginx-ui
  12. # copy nginx config
  13. COPY resources/docker/nginx.conf /usr/local/etc/nginx/nginx.conf
  14. COPY resources/docker/nginx-ui.conf /usr/local/etc/nginx/conf.d/nginx-ui.conf
  15. # copy nginx-ui executable binary
  16. COPY nginx-ui-$TARGETOS-$TARGETARCH$TARGETVARIANT/nginx-ui /usr/local/bin/nginx-ui
  17. # remove default nginx config
  18. RUN rm -f /etc/nginx/conf.d/default.conf \
  19. && rm -f /usr/local/etc/nginx/conf.d/default.conf
  20. # recreate access.log and error.log
  21. RUN rm -f /var/log/nginx/access.log && \
  22. touch /var/log/nginx/access.log && \
  23. rm -f /var/log/nginx/error.log && \
  24. touch /var/log/nginx/error.log