generated from oci/template
make it smol.
nuked the VNC server as that added, i shit ye not, 350mb
This commit is contained in:
parent
348d637948
commit
f9c58ca098
3 changed files with 10 additions and 41 deletions
17
Dockerfile
17
Dockerfile
|
@ -1,19 +1,14 @@
|
|||
FROM alpine:latest
|
||||
|
||||
ENV VNC_BUILTIN_WIDTH=1024 \
|
||||
VNC_BUILTIN_HEIGHT=768 \
|
||||
VNC_BUILTIN_PIXELDEPTH=32 \
|
||||
VNC_BUILTIN_DISABLED=true \
|
||||
DISPLAY=:0
|
||||
|
||||
# Install packages: X/VNC, fonts, terminal, i3, and utilities
|
||||
# Install only essential packages
|
||||
RUN apk add --no-cache \
|
||||
x11vnc xvfb xterm bash \
|
||||
procps iproute2 inetutils-telnet xdpyinfo wget \
|
||||
font-dejavu fontconfig \
|
||||
i3wm i3blocks i3status htop
|
||||
xterm bash \
|
||||
procps inetutils-telnet \
|
||||
fontconfig \
|
||||
i3wm i3status
|
||||
|
||||
# Configure i3
|
||||
RUN mkdir -p /root/.config/i3
|
||||
COPY i3.config /root/.config/i3/config
|
||||
|
||||
# Entrypoint script
|
||||
|
|
|
@ -6,6 +6,9 @@ bindsym $mod+Return exec xterm
|
|||
# Restart i3 inplace (preserves layout/session)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# Close active window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Workspace switching (workspaces 1 to 4)
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
|
|
29
vnc.sh
29
vnc.sh
|
@ -1,34 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Prepare variables
|
||||
: "${VNC_BUILTIN_WIDTH:=1024}"
|
||||
: "${VNC_BUILTIN_HEIGHT:=786}"
|
||||
: "${VNC_BUILTIN_PIXELDEPTH:=32}"
|
||||
: "${VNC_BUILTIN_DISABLED:=true}"
|
||||
|
||||
if [ "${VNC_BUILTIN_DISABLED}" = true ]; then
|
||||
echo "Builtin VNC is disabled. You must ensure the DISPLAY variable is set and the target display is accessible"
|
||||
echo "Using display ${DISPLAY}"
|
||||
else
|
||||
echo "Builtin VNC is enabled. The DISPLAY variable will be ignored and overwritten"
|
||||
export DISPLAY=":0"
|
||||
|
||||
echo "Using display ${DISPLAY} with size of ${VNC_BUILTIN_WIDTH}x${VNC_BUILTIN_HEIGHT} and pixel depth ${VNC_BUILTIN_PIXELDEPTH}"
|
||||
Xvfb ${DISPLAY} -screen 0 "${VNC_BUILTIN_WIDTH}x${VNC_BUILTIN_HEIGHT}x${VNC_BUILTIN_PIXELDEPTH}" &
|
||||
fi
|
||||
|
||||
# Wait for the display to become ready
|
||||
while ! xdpyinfo -display "${DISPLAY}" > /dev/null 2>&1; do
|
||||
echo "Waiting for display ${DISPLAY} to become ready..."
|
||||
sleep 1
|
||||
done
|
||||
echo "Display ${DISPLAY} is ready!"
|
||||
|
||||
# Launch the VNC server if enabled
|
||||
if [ "${VNC_BUILTIN_DISABLED}" != true ]; then
|
||||
x11vnc -bg -forever -nopw -display ${DISPLAY} &
|
||||
fi
|
||||
|
||||
# Launch i3 window manager
|
||||
/usr/bin/i3
|
||||
|
||||
|
|
Loading…
Reference in a new issue