Unsterile commited on
Commit
9b0aebb
1 Parent(s): 69c817f
Files changed (1) hide show
  1. Dockerfile +11 -4
Dockerfile CHANGED
@@ -21,6 +21,7 @@ RUN rm -f /etc/apt/sources.list.d/*.list && \
21
  build-essential \
22
  libsndfile-dev \
23
  software-properties-common \
 
24
  && rm -rf /var/lib/apt/lists/*
25
 
26
  # Install openvscode-server runtime dependencies
@@ -42,6 +43,11 @@ RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
42
  && chown -R user:user /app
43
  RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
44
 
 
 
 
 
 
45
  # Fetch the latest version of OpenVSCode Server
46
  RUN curl -s https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest \
47
  | grep "browser_download_url.*linux-x64.tar.gz" \
@@ -91,9 +97,11 @@ RUN wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | apt-key add
91
  USER user
92
 
93
  # All users can use /home/user as their home directory
94
- ENV HOME=/home/user
 
95
  RUN mkdir $HOME/.cache $HOME/.config \
96
- && chmod -R 777 $HOME
 
97
 
98
  # Set up the Conda environment
99
  ENV CONDA_AUTO_UPDATE_CONDA=false \
@@ -137,6 +145,7 @@ RUN --mount=target=requirements.txt,source=requirements.txt \
137
 
138
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
139
  COPY --chown=user . $HOME/app
 
140
 
141
  RUN chmod +x start_server.sh
142
 
@@ -148,6 +157,4 @@ ENV PYTHONUNBUFFERED=1 \
148
  SYSTEM=spaces \
149
  SHELL=/bin/bash
150
 
151
- EXPOSE 7860 3000 3700
152
-
153
  CMD ["./start_server.sh"]
 
21
  build-essential \
22
  libsndfile-dev \
23
  software-properties-common \
24
+ nginx \
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
  # Install openvscode-server runtime dependencies
 
43
  && chown -R user:user /app
44
  RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
45
 
46
+ #nginx
47
+ RUN mkdir -p /var/cache/nginx /var/log/nginx /var/lib/nginx && \
48
+ touch /var/run/nginx.pid && \
49
+ chown -R user:user /var/cache/nginx /var/log/nginx /var/lib/nginx /var/run/nginx.pid
50
+
51
  # Fetch the latest version of OpenVSCode Server
52
  RUN curl -s https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest \
53
  | grep "browser_download_url.*linux-x64.tar.gz" \
 
97
  USER user
98
 
99
  # All users can use /home/user as their home directory
100
+ ENV HOME=/home/user \
101
+ PATH=/home/user/.local/bin:$PATH
102
  RUN mkdir $HOME/.cache $HOME/.config \
103
+ && chown -R user:user $HOME \
104
+ && chmod 700 $HOME/.cache $HOME/.config
105
 
106
  # Set up the Conda environment
107
  ENV CONDA_AUTO_UPDATE_CONDA=false \
 
145
 
146
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
147
  COPY --chown=user . $HOME/app
148
+ COPY --chown=user nginx.conf /etc/nginx/sites-available/default
149
 
150
  RUN chmod +x start_server.sh
151
 
 
157
  SYSTEM=spaces \
158
  SHELL=/bin/bash
159
 
 
 
160
  CMD ["./start_server.sh"]