rocky1410 commited on
Commit
7ae3241
·
verified ·
1 Parent(s): ba4e1ae

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -11
Dockerfile CHANGED
@@ -1,9 +1,7 @@
1
  FROM ubuntu:22.04
2
-
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PORT=7860 DISPLAY=:0 LANG=C.UTF-8
5
 
6
- # Install runtime deps
7
  RUN apt-get update && apt-get install -y \
8
  curl sudo bash \
9
  xfce4 xfce4-terminal x11vnc xvfb dbus-x11 \
@@ -11,32 +9,28 @@ RUN apt-get update && apt-get install -y \
11
  libgtk-3-0 libxcb-render0 libxcb-shape0 libxcb-xfixes0 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Ensure /etc/sudoers.d exists and create user
15
  RUN mkdir -p /etc/sudoers.d \
16
  && useradd -m -s /bin/bash appuser \
17
  && echo "appuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/appuser
18
 
 
 
 
 
19
  USER appuser
20
  WORKDIR /home/appuser
21
 
22
- # Set SHELL explicitly for installer
23
  SHELL ["/bin/bash", "-c"]
24
 
25
- # Install Zed using official script
26
  RUN curl -fL https://zed.dev/install.sh | bash
27
 
28
- # Autostart Zed in XFCE
29
  RUN mkdir -p /home/appuser/.config/autostart \
30
  && printf '%s\n' \
31
  "[Desktop Entry]" \
32
  "Type=Application" \
33
  "Name=Zed" \
34
- "Exec=zed" \
35
  "X-GNOME-Autostart-enabled=true" \
36
  > /home/appuser/.config/autostart/zed.desktop
37
 
38
- # Copy startup script
39
- COPY start.sh /usr/local/bin/start.sh
40
- RUN chmod +x /usr/local/bin/start.sh
41
-
42
  CMD ["/usr/local/bin/start.sh"]
 
1
  FROM ubuntu:22.04
 
2
  ENV DEBIAN_FRONTEND=noninteractive
3
  ENV PORT=7860 DISPLAY=:0 LANG=C.UTF-8
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  curl sudo bash \
7
  xfce4 xfce4-terminal x11vnc xvfb dbus-x11 \
 
9
  libgtk-3-0 libxcb-render0 libxcb-shape0 libxcb-xfixes0 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
 
12
  RUN mkdir -p /etc/sudoers.d \
13
  && useradd -m -s /bin/bash appuser \
14
  && echo "appuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/appuser
15
 
16
+ # Copy start script as root
17
+ COPY start.sh /usr/local/bin/start.sh
18
+ RUN chmod +x /usr/local/bin/start.sh
19
+
20
  USER appuser
21
  WORKDIR /home/appuser
22
 
 
23
  SHELL ["/bin/bash", "-c"]
24
 
 
25
  RUN curl -fL https://zed.dev/install.sh | bash
26
 
 
27
  RUN mkdir -p /home/appuser/.config/autostart \
28
  && printf '%s\n' \
29
  "[Desktop Entry]" \
30
  "Type=Application" \
31
  "Name=Zed" \
32
+ "Exec=$HOME/.local/bin/zed" \
33
  "X-GNOME-Autostart-enabled=true" \
34
  > /home/appuser/.config/autostart/zed.desktop
35
 
 
 
 
 
36
  CMD ["/usr/local/bin/start.sh"]