Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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 |
-
#
|
17 |
-
RUN wget https://
|
18 |
-
&&
|
19 |
-
&&
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
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
|
35 |
-
chmod -R 777 /app/uploads
|
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 |
-
#
|
43 |
-
|
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
|