File size: 760 Bytes
b0782ac
 
 
 
 
 
 
 
 
 
 
3e90a8d
 
b0782ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM ubuntu

# Based on https://huggingface.co./spaces/radames/nginx-gradio-reverse-proxy/blob/main/Dockerfile
USER root

RUN apt-get -y update && apt-get -y install nginx
RUN mkdir -p /var/cache/nginx \
             /var/log/nginx \
             /var/lib/nginx
RUN touch /var/run/nginx.pid

# Ubuntu 24.04 includes ubuntu with uid 1000
RUN userdel -r ubuntu
RUN chown -R 1000:1000 /var/cache/nginx \
                       /var/log/nginx \
                       /var/lib/nginx \
                       /var/run/nginx.pid

RUN useradd -m -u 1000 user

USER user
ENV HOME=/home/user

RUN mkdir $HOME/app
WORKDIR $HOME/app

# Copy nginx configuration
COPY --chown=user nginx.conf /etc/nginx/sites-available/default
COPY --chown=user . .

CMD ["bash", "run.sh"]