Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
@@ -4,19 +4,21 @@ FROM python:3.10-slim
|
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Install dependencies: wget, apt-transport-https, gnupg2,
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
wget \
|
10 |
apt-transport-https \
|
11 |
gnupg2 \
|
12 |
unzip \
|
13 |
-
|
14 |
-
&& unzip roslyn.zip -d /usr/local/roslyn \
|
15 |
&& apt-get install -y python3-pip \
|
16 |
-
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
17 |
|
18 |
# Add Roslyn compiler (csc) to PATH
|
19 |
-
ENV PATH="/usr/local/roslyn/
|
20 |
|
21 |
# Create a non-root user and set it as the user for the rest of the image
|
22 |
RUN useradd -ms /bin/bash appuser
|
|
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install dependencies: wget, apt-transport-https, gnupg2, NuGet, and Python pip
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
wget \
|
10 |
apt-transport-https \
|
11 |
gnupg2 \
|
12 |
unzip \
|
13 |
+
nuget \
|
|
|
14 |
&& apt-get install -y python3-pip \
|
15 |
+
&& rm -rf /var/lib/apt/lists/*
|
16 |
+
|
17 |
+
# Install Roslyn via NuGet
|
18 |
+
RUN nuget install Microsoft.Net.Compilers -Version 4.0.1 -OutputDirectory /usr/local/roslyn
|
19 |
|
20 |
# Add Roslyn compiler (csc) to PATH
|
21 |
+
ENV PATH="/usr/local/roslyn/Microsoft.Net.Compilers.4.0.1/tools:${PATH}"
|
22 |
|
23 |
# Create a non-root user and set it as the user for the rest of the image
|
24 |
RUN useradd -ms /bin/bash appuser
|