make it smol.
All checks were successful
Build Docker Image on Commit / build-and-publish (push) Successful in 10s
Build and Publish Docker Image on Tag / build-and-publish (push) Successful in 8s

nuked the VNC server as that added, i shit ye not, 350mb
This commit is contained in:
Merith 2025-06-05 05:26:41 +00:00
parent 348d637948
commit f9c58ca098
3 changed files with 10 additions and 41 deletions

View file

@ -1,19 +1,14 @@
FROM alpine:latest FROM alpine:latest
ENV VNC_BUILTIN_WIDTH=1024 \ # Install only essential packages
VNC_BUILTIN_HEIGHT=768 \
VNC_BUILTIN_PIXELDEPTH=32 \
VNC_BUILTIN_DISABLED=true \
DISPLAY=:0
# Install packages: X/VNC, fonts, terminal, i3, and utilities
RUN apk add --no-cache \ RUN apk add --no-cache \
x11vnc xvfb xterm bash \ xterm bash \
procps iproute2 inetutils-telnet xdpyinfo wget \ procps inetutils-telnet \
font-dejavu fontconfig \ fontconfig \
i3wm i3blocks i3status htop i3wm i3status
# Configure i3 # Configure i3
RUN mkdir -p /root/.config/i3
COPY i3.config /root/.config/i3/config COPY i3.config /root/.config/i3/config
# Entrypoint script # Entrypoint script

View file

@ -6,6 +6,9 @@ bindsym $mod+Return exec xterm
# Restart i3 inplace (preserves layout/session) # Restart i3 inplace (preserves layout/session)
bindsym $mod+Shift+r restart bindsym $mod+Shift+r restart
# Close active window
bindsym $mod+Shift+q kill
# Workspace switching (workspaces 1 to 4) # Workspace switching (workspaces 1 to 4)
bindsym $mod+1 workspace 1 bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2 bindsym $mod+2 workspace 2

29
vnc.sh
View file

@ -1,34 +1,5 @@
#!/bin/bash #!/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 # Launch i3 window manager
/usr/bin/i3 /usr/bin/i3