Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +14 -8
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Use an official Python slim image
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
# Install Wine and dependencies for running Windows applications
|
@@ -11,19 +11,25 @@ RUN dpkg --add-architecture i386 && \
|
|
11 |
apt-utils && \
|
12 |
apt-get clean
|
13 |
|
14 |
-
#
|
15 |
-
RUN wget https://download-link-for-csc-version-4.8.exe -O dotnet-installer.exe && \
|
16 |
-
wine dotnet-installer.exe
|
17 |
-
|
18 |
-
# Set up working directories and permissions
|
19 |
WORKDIR /app
|
20 |
RUN mkdir -p /app/uploads /app/compiled && chmod -R 777 /app/uploads /app/compiled
|
21 |
|
22 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
COPY requirements.txt .
|
24 |
RUN pip install -r requirements.txt
|
25 |
|
26 |
-
# Copy
|
27 |
COPY . .
|
28 |
|
29 |
# Expose the Flask app port
|
|
|
1 |
+
# Use an official Python slim image for the base
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
# Install Wine and dependencies for running Windows applications
|
|
|
11 |
apt-utils && \
|
12 |
apt-get clean
|
13 |
|
14 |
+
# Create directories and set permissions
|
|
|
|
|
|
|
|
|
15 |
WORKDIR /app
|
16 |
RUN mkdir -p /app/uploads /app/compiled && chmod -R 777 /app/uploads /app/compiled
|
17 |
|
18 |
+
# Download and install the .NET Framework redistributable that includes csc.exe
|
19 |
+
# Replace this link with the correct version you need for csc 4.8
|
20 |
+
RUN wget https://download.microsoft.com/download/1/2/7/127FAFB4-1D34-4997-8E96-3E9892936C58/ndp48-x86-x64-allos-enu.exe -O dotnet-installer.exe
|
21 |
+
|
22 |
+
# Use Wine to run the installer
|
23 |
+
RUN wine dotnet-installer.exe /quiet /norestart
|
24 |
+
|
25 |
+
# Verify if csc.exe is installed and accessible
|
26 |
+
RUN wine64 "C:/Windows/Microsoft.NET/Framework64/v4.0.30319/csc.exe" /help || echo "CSC is installed"
|
27 |
+
|
28 |
+
# Copy the requirements file and install Python dependencies
|
29 |
COPY requirements.txt .
|
30 |
RUN pip install -r requirements.txt
|
31 |
|
32 |
+
# Copy the Flask app files
|
33 |
COPY . .
|
34 |
|
35 |
# Expose the Flask app port
|