17 lines
597 B
Docker
17 lines
597 B
Docker
FROM nginx:stable-alpine
|
|
|
|
#COPY conf /etc/nginx
|
|
COPY ./entrypoint_host.sh /entrypoint_host.sh
|
|
RUN apk add shadow \
|
|
&& groupmod -g 1001 nginx \
|
|
&& usermod -u 1000 -g 1001 nginx \
|
|
&& find / -user 101 -exec chown -v -h 1000 '{}' \; \
|
|
&& find / -group 101 -exec chgrp -v 1001 '{}' \; \
|
|
&& curl -s https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/_internal/tls_configs/options-ssl-nginx.conf > /etc/nginx/ssl.conf \
|
|
&& chmod +x /entrypoint_host.sh
|
|
|
|
VOLUME ["/var/cache/nginx", "/var/run"]
|
|
|
|
ENTRYPOINT ["/entrypoint_host.sh"]
|
|
CMD ["nginx", "-g", "daemon off;"]
|