Shinhati2023 commited on
Commit
6e16d43
·
verified ·
1 Parent(s): efc6a71

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -6
Dockerfile CHANGED
@@ -28,16 +28,20 @@ RUN apt-get update && apt-get install -y \
28
  liblist-moreutils-perl \
29
  libtry-tiny-perl \
30
  libdatetime-timezone-perl \
 
 
31
  && rm -rf /var/lib/apt/lists/*
32
 
33
- # 2. Install KasmVNC (THE FIX)
34
- # We download the package first
35
  RUN wget https://github.com/kasmtech/KasmVNC/releases/download/v1.3.1/kasmvncserver_jammy_1.3.1_amd64.deb
36
 
37
- # We install it, but we pipe "2" into it to answer the question automatically if it asks.
38
- # We also use 'mkdir' to ensure the folder exists, preventing one class of errors.
39
- RUN mkdir -p /etc/kasmvnc && \
40
- echo "2" | apt-get install -y ./kasmvncserver_*.deb || apt-get install -f -y && \
 
 
 
41
  rm kasmvncserver_*.deb
42
 
43
  # 3. Install Python libraries
 
28
  liblist-moreutils-perl \
29
  libtry-tiny-perl \
30
  libdatetime-timezone-perl \
31
+ # Add 'debconf-utils' to allow us to pre-seed answers
32
+ debconf-utils \
33
  && rm -rf /var/lib/apt/lists/*
34
 
35
+ # 2. Install KasmVNC (THE NUCLEAR FIX)
 
36
  RUN wget https://github.com/kasmtech/KasmVNC/releases/download/v1.3.1/kasmvncserver_jammy_1.3.1_amd64.deb
37
 
38
+ # --- PRE-SEEDING ANSWERS ---
39
+ # This block tells the system: "When kasmvncserver asks about 'daemon_user_write', answer 'false' (Option 2)"
40
+ RUN echo "kasmvncserver kasmvncserver/daemon_user_write boolean false" | debconf-set-selections && \
41
+ echo "kasmvncserver kasmvncserver/default_user_write boolean false" | debconf-set-selections
42
+
43
+ # Now we install, and it should see the answer is already there.
44
+ RUN apt-get install -y ./kasmvncserver_*.deb || apt-get install -f -y && \
45
  rm kasmvncserver_*.deb
46
 
47
  # 3. Install Python libraries