Dockerfile 650 B

123456789101112131415161718192021222324
  1. FROM nginx:1.13
  2. MAINTAINER Mark Shust <mark@shust.com>
  3. RUN groupadd -g 1000 app \
  4. && useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
  5. RUN touch /var/run/nginx.pid
  6. RUN mkdir /sock
  7. RUN apt-get update && apt-get install -y openssl
  8. RUN mkdir /etc/nginx/certs \
  9. && echo -e "\n\n\n\n\n\n\n" | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/certs/nginx.key -out /etc/nginx/certs/nginx.crt
  10. RUN chown -R app:app /etc/nginx/certs /sock /var/cache/nginx/ /var/run/nginx.pid /sock
  11. COPY ./conf/nginx.conf /etc/nginx/
  12. COPY ./conf/default.conf /etc/nginx/conf.d/
  13. EXPOSE 8443
  14. USER app:app
  15. VOLUME /var/www
  16. WORKDIR /var/www/html