21 lines
454 B
Docker
21 lines
454 B
Docker
FROM alpine:3.19
|
|
|
|
# install packages
|
|
RUN apk add --no-cache nginx shadow 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
|
|
|
|
# do the
|
|
USER nginx
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
|
CMD ["/usr/sbin/nginx", "-c", "/etc/nginx/nginx.conf"]
|