sigyllly commited on
Commit
a07f417
·
verified ·
1 Parent(s): 9c0cec7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -5
Dockerfile CHANGED
@@ -1,16 +1,27 @@
1
- # Use the Inno Setup Docker image
2
- FROM amake/innosetup
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
- # Copy your main.py and any other necessary files
8
- COPY main.py .
9
  COPY requirements.txt .
10
 
11
- # Install Flask and other Python dependencies
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  # Expose the necessary port
15
  EXPOSE 7860
16
 
 
1
+ # Stage 1: Use the official Python image to install dependencies
2
+ FROM python:3.10-slim as builder
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Copy the requirements file
 
8
  COPY requirements.txt .
9
 
10
+ # Install Python dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Stage 2: Use the Inno Setup Docker image
14
+ FROM amake/innosetup:latest
15
+
16
+ # Set the working directory
17
+ WORKDIR /app
18
+
19
+ # Copy the Flask app files from the builder stage
20
+ COPY --from=builder /app /app
21
+
22
+ # Copy the main.py file
23
+ COPY main.py .
24
+
25
  # Expose the necessary port
26
  EXPOSE 7860
27