diff options
Diffstat (limited to 'build/nginx/Dockerfile')
-rw-r--r-- | build/nginx/Dockerfile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/build/nginx/Dockerfile b/build/nginx/Dockerfile new file mode 100644 index 0000000..f74d555 --- /dev/null +++ b/build/nginx/Dockerfile @@ -0,0 +1,30 @@ +FROM alpine:latest + +# install packages +RUN apk add --no-cache nginx shadow curl tini +RUN rm -fr /var/cache/apk/* + +# update nginx user +RUN groupmod --gid 1000 nginx +RUN usermod --uid 1000 nginx + +# remove build packages +RUN apk del shadow + +# make log syms +RUN ln -sf /dev/stdout /var/log/nginx/access.log && \ + ln -sf /dev/stderr /var/log/nginx/error.log + +# copy configs +RUN mkdir -p /etc/nginx +COPY ./*.conf /etc/nginx/ +RUN chown -R nginx:nginx /etc/nginx + +# copy entrypoint +COPY ./entrypoint.sh /usr/local/bin/entrypoint +RUN chmod +x /usr/local/bin/entrypoint + +# do the +USER nginx +ENTRYPOINT ["/sbin/tini", "--"] +CMD ["/usr/local/bin/entrypoint"] |