arnob69 commited on
Commit
1fa2e03
·
verified ·
1 Parent(s): 5b7e1a9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -7,31 +7,31 @@ RUN apt-get update && apt-get install -y \
7
  git \
8
  sudo \
9
  supervisor \
 
10
  && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
11
  && apt-get install -y nodejs \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Install OpenVSCode Server
15
  RUN curl -fsSL "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.85.1/openvscode-server-v1.85.1-linux-x64.tar.gz" | tar -xz -C /opt
16
 
17
- # Install Freebuff globally
18
  RUN npm install -g freebuff
19
 
20
- # Enforce Hugging Face strict permissions using User ID 1000
21
  RUN useradd -m -u 1000 user && \
22
  echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
23
 
24
  RUN mkdir -p /home/user/workspace/app && chown -R user:user /home/user
25
 
 
 
 
26
  USER user
27
  ENV HOME=/home/user \
28
  PATH=/home/user/.local/bin:$PATH
29
  WORKDIR /home/user/workspace
30
 
31
- # Copy configuration and web code files
32
  COPY --chown=user:user supervisord.conf /home/user/supervisord.conf
 
33
  COPY --chown=user:user index.html /home/user/workspace/index.html
34
- COPY --chown=user:user server.js /home/user/workspace/server.js
35
 
36
  EXPOSE 7860
37
 
 
7
  git \
8
  sudo \
9
  supervisor \
10
+ nginx \
11
  && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
12
  && apt-get install -y nodejs \
13
  && rm -rf /var/lib/apt/lists/*
14
 
 
15
  RUN curl -fsSL "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.85.1/openvscode-server-v1.85.1-linux-x64.tar.gz" | tar -xz -C /opt
16
 
 
17
  RUN npm install -g freebuff
18
 
 
19
  RUN useradd -m -u 1000 user && \
20
  echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
21
 
22
  RUN mkdir -p /home/user/workspace/app && chown -R user:user /home/user
23
 
24
+ RUN mkdir -p /var/lib/nginx /var/log/nginx && \
25
+ chown -R user:user /var/lib/nginx /var/log/nginx /etc/nginx
26
+
27
  USER user
28
  ENV HOME=/home/user \
29
  PATH=/home/user/.local/bin:$PATH
30
  WORKDIR /home/user/workspace
31
 
 
32
  COPY --chown=user:user supervisord.conf /home/user/supervisord.conf
33
+ COPY --chown=user:user nginx.conf /home/user/nginx.conf
34
  COPY --chown=user:user index.html /home/user/workspace/index.html
 
35
 
36
  EXPOSE 7860
37