Spaces:
Running
Running
File size: 977 Bytes
6252ca9 0a5dd2f 388b91f 3d44dfc 0a5dd2f 6252ca9 388b91f 7ef3967 6252ca9 7ef3967 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# Use the official NGINX image
FROM nginx:latest
#=================================================================
USER root
#=================================================================
RUN groupadd user && \
useradd -d /home/user -ms /bin/bash -g user -G user -p user user
COPY nginx.conf /etc/nginx/nginx.conf
COPY html /usr/share/nginx/html
RUN mkdir -p /var/cache/nginx \
/var/log/nginx \
/var/lib/nginx && \
touch /var/run/nginx.pid && \
chown -R user:user /var/cache/nginx \
/var/log/nginx \
/var/lib/nginx \
/var/run/nginx.pid
#=================================================================
USER user
#=================================================================
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME
COPY --chown=user:user --chmod=755 entrypoint.sh $HOME
EXPOSE 7860
ENTRYPOINT [ "./entrypoint.sh" ] |