sigyllly commited on
Commit
d9c409c
·
verified ·
1 Parent(s): c25609b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -17
Dockerfile CHANGED
@@ -9,17 +9,17 @@ RUN apt-get update && apt-get install -y \
9
  wget \
10
  apt-transport-https \
11
  gnupg2 \
12
- unzip \
13
  python3-pip \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Download and install Roslyn
17
- RUN wget https://github.com/dotnet/roslyn/releases/download/v4.0.1/roslyn.zip \
18
- && unzip roslyn.zip -d /usr/local/roslyn \
19
- && rm roslyn.zip
20
-
21
- # Set the PATH for the Roslyn compiler
22
- ENV PATH="/usr/local/roslyn/Microsoft.Net.Compilers.4.0.1/tools:${PATH}"
 
23
 
24
  # Create a non-root user and set it as the user for the rest of the image
25
  RUN useradd -ms /bin/bash appuser
@@ -31,16 +31,11 @@ RUN chown -R appuser:appuser /app
31
  USER appuser
32
 
33
  # Create necessary directories and set permissions
34
- RUN mkdir -p /app/uploads /home/appuser/.mono && \
35
- chmod -R 777 /app/uploads /home/appuser/.mono
36
-
37
- # Set the MONO_HOME environment variable
38
- ENV MONO_HOME="/home/appuser/.mono"
39
- # Add the Mono tools directory to PATH
40
- ENV PATH="${PATH}:${MONO_HOME}/bin:/usr/bin"
41
 
42
- # Verify that csc is installed
43
- RUN which csc
44
 
45
  # Copy the requirements file with the correct owner
46
  COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt
 
9
  wget \
10
  apt-transport-https \
11
  gnupg2 \
 
12
  python3-pip \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install the .NET SDK (adjust version as necessary)
16
+ RUN wget https://packages.microsoft.com/config/debian/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
17
+ && dpkg -i packages-microsoft-prod.deb \
18
+ && apt-get update \
19
+ && apt-get install -y dotnet-sdk-7.0 \
20
+ && rm packages-microsoft-prod.deb \
21
+ && apt-get clean \
22
+ && rm -rf /var/lib/apt/lists/*
23
 
24
  # Create a non-root user and set it as the user for the rest of the image
25
  RUN useradd -ms /bin/bash appuser
 
31
  USER appuser
32
 
33
  # Create necessary directories and set permissions
34
+ RUN mkdir -p /app/uploads && \
35
+ chmod -R 777 /app/uploads
 
 
 
 
 
36
 
37
+ # Set the PATH for the .NET SDK (if needed)
38
+ ENV PATH="$PATH:/root/.dotnet/tools"
39
 
40
  # Copy the requirements file with the correct owner
41
  COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt