sigyllly commited on
Commit
cd28ddd
·
verified ·
1 Parent(s): 801b804

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -3
Dockerfile CHANGED
@@ -4,12 +4,12 @@ FROM python:3.10-slim
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
- # Install dependencies: .NET SDK (Roslyn included), wget, and Python pip
8
  RUN apt-get update && apt-get install -y \
9
  wget \
10
  apt-transport-https \
11
  gnupg2 \
12
- && wget https://packages.microsoft.com/config/debian/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
13
  && dpkg -i packages-microsoft-prod.deb \
14
  && apt-get update && apt-get install -y \
15
  dotnet-sdk-7.0 \
@@ -26,7 +26,17 @@ RUN chown -R appuser:appuser /app
26
  USER appuser
27
 
28
  # Create necessary directories and set permissions
29
- RUN mkdir -p /app/uploads && chmod -R 777 /app/uploads
 
 
 
 
 
 
 
 
 
 
30
 
31
  # Copy the requirements file with the correct owner
32
  COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Install dependencies: wget, apt-transport-https, gnupg2, .NET SDK, and Python pip
8
  RUN apt-get update && apt-get install -y \
9
  wget \
10
  apt-transport-https \
11
  gnupg2 \
12
+ && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
13
  && dpkg -i packages-microsoft-prod.deb \
14
  && apt-get update && apt-get install -y \
15
  dotnet-sdk-7.0 \
 
26
  USER appuser
27
 
28
  # Create necessary directories and set permissions
29
+ RUN mkdir -p /app/uploads /home/appuser/.mono && \
30
+ chmod -R 777 /app/uploads /home/appuser/.mono
31
+
32
+ # Set the MONO_HOME environment variable
33
+ ENV MONO_HOME="/home/appuser/.mono"
34
+
35
+ # Add the Mono tools directory to PATH
36
+ ENV PATH="${PATH}:${MONO_HOME}/bin:/usr/bin"
37
+
38
+ # Ensure mcs is in the PATH
39
+ RUN echo $PATH && which mcs
40
 
41
  # Copy the requirements file with the correct owner
42
  COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt