CoolFace
Apppublic

radames/nginx-gradio-reverse-proxy

sourceHugging Faceupdated 3y agoView on Hugging Face
26likes
Dockerfile39 linesDownload Raw Back to root
1# See https://hub.docker.com/r/nikolaik/python-nodejs2#     https://github.com/nikolaik/docker-python-nodejs3# Default user is 'pn' with uid 1000, gid 10004FROM nikolaik/python-nodejs:python3.10-nodejs185 6# Install nginx and give permissions to 'pn'7# See https://www.rockyourcode.com/run-docker-nginx-as-non-root-user/8USER root9 10RUN apt-get -y update && apt-get -y install nginx11 12RUN mkdir -p /var/cache/nginx \13             /var/log/nginx \14             /var/lib/nginx15RUN touch /var/run/nginx.pid16 17RUN chown -R pn:pn /var/cache/nginx \18                       /var/log/nginx \19                       /var/lib/nginx \20                       /var/run/nginx.pid21 22# Install dependencies and build app as non-root23USER pn24ENV HOME=/home/pn \25    PATH=/home/pn/.local/bin:$PATH26 27RUN mkdir $HOME/app28 29WORKDIR $HOME/app30 31COPY --chown=pn requirements.txt requirements.txt32RUN pip install --no-cache-dir -r requirements.txt33 34# Copy nginx configuration35COPY --chown=pn nginx.conf /etc/nginx/sites-available/default36 37COPY --chown=pn . .38 39CMD ["bash", "run.sh"]