sigyllly commited on
Commit
23a142f
·
verified ·
1 Parent(s): d830245

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -12
Dockerfile CHANGED
@@ -4,13 +4,14 @@ FROM python:3.10-slim
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
- # Install dependencies: .NET SDK, wget, and Python pip
8
  RUN apt-get update && apt-get install -y \
9
  wget \
10
  apt-transport-https \
11
- && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
12
- && dpkg -i packages-microsoft-prod.deb \
13
- && apt-get update && apt-get install -y dotnet-sdk-7.0 \
 
14
  && apt-get install -y python3-pip \
15
  && rm -rf /var/lib/apt/lists/*
16
 
@@ -24,16 +25,16 @@ RUN chown -R appuser:appuser /app
24
  USER appuser
25
 
26
  # Create necessary directories and set permissions
27
- RUN mkdir -p /app/uploads /home/appuser/.dotnet && \
28
- chmod -R 777 /app/uploads /home/appuser/.dotnet
29
 
30
- # Set the DOTNET_HOME environment variable
31
- ENV DOTNET_HOME="/home/appuser/.dotnet"
32
- # Add the .NET SDK tools directory to PATH
33
- ENV PATH="${PATH}:${DOTNET_HOME}:/usr/share/dotnet"
34
 
35
- # Ensure csc is in the PATH
36
- RUN echo $PATH && which csc
37
 
38
  # Copy the requirements file with the correct owner
39
  COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Install dependencies: Mono, wget, and Python pip
8
  RUN apt-get update && apt-get install -y \
9
  wget \
10
  apt-transport-https \
11
+ && apt-get install -y gnupg2 \
12
+ && echo "deb https://download.mono-project.com/repo/debian stable main" >> /etc/apt/sources.list.d/mono-official-stable.list \
13
+ && wget -qO - https://download.mono-project.com/repo/xamarin.gpg | apt-key add - \
14
+ && apt-get update && apt-get install -y mono-complete \
15
  && apt-get install -y python3-pip \
16
  && rm -rf /var/lib/apt/lists/*
17
 
 
25
  USER appuser
26
 
27
  # Create necessary directories and set permissions
28
+ RUN mkdir -p /app/uploads /home/appuser/.mono && \
29
+ chmod -R 777 /app/uploads /home/appuser/.mono
30
 
31
+ # Set the MONO_HOME environment variable
32
+ ENV MONO_HOME="/home/appuser/.mono"
33
+ # Add the Mono tools directory to PATH
34
+ ENV PATH="${PATH}:${MONO_HOME}/bin:/usr/bin"
35
 
36
+ # Ensure mcs is in the PATH
37
+ RUN echo $PATH && which mcs
38
 
39
  # Copy the requirements file with the correct owner
40
  COPY --chown=appuser:appuser ./requirements.txt /app/requirements.txt