enable DHCP on gns3 use
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 13s

This commit is contained in:
Merith 2025-06-05 05:46:45 +00:00
parent f9c58ca098
commit 427726ea22
2 changed files with 16 additions and 3 deletions

View file

@ -2,8 +2,8 @@ FROM alpine:latest
# Install only essential packages
RUN apk add --no-cache \
xterm bash \
procps inetutils-telnet \
xterm bash procps \
iproute2 iputils \
fontconfig \
i3wm i3status

15
vnc.sh
View file

@ -1,7 +1,20 @@
#!/bin/bash
# Bring up all interfaces and request DHCP, except loopback
if [ -d /gns3 ]; then
echo "Running in GNS3 environment, setting up interfaces for DHCP..."
for iface in $(ip -o link show | awk -F': ' '{print $2}' | grep -v '^lo$'); do
echo "Bringing up interface: $iface"
ip link set "$iface" up
udhcpc -i "$iface" &
done
fi
# Wait a moment for DHCP leases
sleep 2
# Launch i3 window manager
/usr/bin/i3
echo "i3 exited unexpectedly"
sleep infinity
sleep infinity