Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -17
Dockerfile
CHANGED
@@ -4,36 +4,31 @@ FROM python:3.10-slim
|
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Install dependencies:
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
wget \
|
10 |
-
apt-transport-https \
|
11 |
gnupg2 \
|
12 |
-
|
13 |
&& wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
|
14 |
&& dpkg -i packages-microsoft-prod.deb \
|
15 |
-
&& apt-get update
|
16 |
-
dotnet-sdk-7.0 \
|
17 |
-
python3-pip \
|
18 |
&& rm packages-microsoft-prod.deb \
|
19 |
&& apt-get clean \
|
20 |
&& rm -rf /var/lib/apt/lists/*
|
21 |
|
22 |
-
# Ensure the
|
23 |
-
|
|
|
24 |
|
25 |
-
#
|
26 |
-
ENV DOTNET_ROOT="/usr/share/dotnet"
|
27 |
-
ENV PATH="$PATH:$DOTNET_ROOT"
|
28 |
-
|
29 |
-
# Ensure csc is in the PATH
|
30 |
RUN echo $PATH && which csc
|
31 |
|
32 |
-
#
|
33 |
-
|
34 |
|
35 |
-
#
|
36 |
-
RUN
|
37 |
|
38 |
# Copy the Flask app files
|
39 |
COPY . .
|
|
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install dependencies: wget, gnupg2, and unzip
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
wget \
|
|
|
10 |
gnupg2 \
|
11 |
+
apt-transport-https \
|
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 \
|
15 |
+
&& apt-get install -y dotnet-sdk-7.0 \
|
|
|
16 |
&& rm packages-microsoft-prod.deb \
|
17 |
&& apt-get clean \
|
18 |
&& rm -rf /var/lib/apt/lists/*
|
19 |
|
20 |
+
# Ensure the .NET SDK and csc compiler are in PATH
|
21 |
+
ENV DOTNET_ROOT=/usr/share/dotnet
|
22 |
+
ENV PATH=$PATH:/usr/share/dotnet
|
23 |
|
24 |
+
# Verify the installation by checking if csc is available
|
|
|
|
|
|
|
|
|
25 |
RUN echo $PATH && which csc
|
26 |
|
27 |
+
# Install Python pip and other dependencies
|
28 |
+
RUN apt-get install -y python3-pip && pip3 install --no-cache-dir --upgrade -r /app/requirements.txt
|
29 |
|
30 |
+
# Create necessary directories and set permissions
|
31 |
+
RUN mkdir -p /app/uploads && chmod -R 777 /app/uploads
|
32 |
|
33 |
# Copy the Flask app files
|
34 |
COPY . .
|