SalHargis commited on
Commit
fef6880
·
verified ·
1 Parent(s): 1126f67

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -1,11 +1,11 @@
1
- # 1. Use Debian Bullseye (Stable Linux) instead of the Python image
2
- # This ensures Python and Tkinter versions match perfectly.
3
  FROM debian:bullseye
4
 
5
- # 2. Prevent interactive prompts during installation
6
  ENV DEBIAN_FRONTEND=noninteractive
7
 
8
- # 3. Install Python, Tkinter, and GUI tools all from the system package manager
9
  RUN apt-get update && apt-get install -y \
10
  python3 \
11
  python3-pip \
@@ -16,7 +16,6 @@ RUN apt-get update && apt-get install -y \
16
  novnc \
17
  net-tools \
18
  scrot \
19
- dos2unix \
20
  && rm -rf /var/lib/apt/lists/*
21
 
22
  # 4. Fix the 403 Error (Missing Index)
@@ -29,14 +28,13 @@ WORKDIR /app
29
  COPY . .
30
 
31
  # 7. Install Python requirements
32
- # We use --break-system-packages because we are intentionally using the system python
33
- RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt
34
 
35
  # 8. Create the user (ID 1000)
36
  RUN useradd -m -u 1000 user
37
 
38
  # 9. GENERATE STARTUP SCRIPT
39
- # We explicitly call 'python3' here
40
  RUN echo '#!/bin/bash' > start.sh && \
41
  echo 'export DISPLAY=:1' >> start.sh && \
42
  echo 'Xvfb :1 -screen 0 1440x960x24 &' >> start.sh && \
 
1
+ # 1. Use Debian Bullseye (Stable Linux)
2
+ # This ensures Python and Tkinter match perfectly to prevent the 503 crash.
3
  FROM debian:bullseye
4
 
5
+ # 2. Prevent interactive prompts
6
  ENV DEBIAN_FRONTEND=noninteractive
7
 
8
+ # 3. Install Python, Tkinter, and GUI tools
9
  RUN apt-get update && apt-get install -y \
10
  python3 \
11
  python3-pip \
 
16
  novnc \
17
  net-tools \
18
  scrot \
 
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
  # 4. Fix the 403 Error (Missing Index)
 
28
  COPY . .
29
 
30
  # 7. Install Python requirements
31
+ # CORRECTION: Removed '--break-system-packages' which causes errors on Bullseye
32
+ RUN pip3 install --no-cache-dir -r requirements.txt
33
 
34
  # 8. Create the user (ID 1000)
35
  RUN useradd -m -u 1000 user
36
 
37
  # 9. GENERATE STARTUP SCRIPT
 
38
  RUN echo '#!/bin/bash' > start.sh && \
39
  echo 'export DISPLAY=:1' >> start.sh && \
40
  echo 'Xvfb :1 -screen 0 1440x960x24 &' >> start.sh && \