revert(cistech-tunnel): restore to working state at 5d54ed6
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
- Removed build/ folder - Restored source/ folder with original Dockerfile and entrypoint.sh - Reverted config files to original working state - Cleaned up shared/ to only contain host routing scripts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2
apps/cistech-tunnel/build/.gitignore
vendored
2
apps/cistech-tunnel/build/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
# Large binary files - track tar.gz but not 7z
|
||||
*.7z
|
||||
@@ -1,80 +0,0 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="alexz"
|
||||
LABEL description="OpenConnect SSO VPN in Docker with noVNC"
|
||||
LABEL version="1.0.0"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# VNC/noVNC settings
|
||||
ENV DISPLAY=:1
|
||||
ENV VNC_PORT=5901
|
||||
ENV NOVNC_PORT=6092
|
||||
|
||||
# Python/Playwright settings
|
||||
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
ENV PATH=/opt/venv/bin:$PATH
|
||||
|
||||
# Install dependencies (no systemd)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
dbus \
|
||||
dbus-x11 \
|
||||
libgtk-3-0 \
|
||||
libglib2.0-0 \
|
||||
libstdc++6 \
|
||||
iptables \
|
||||
libxml2 \
|
||||
zlib1g \
|
||||
policykit-1 \
|
||||
xdg-utils \
|
||||
libwebkit2gtk-4.0-37 \
|
||||
tigervnc-standalone-server \
|
||||
tigervnc-common \
|
||||
novnc \
|
||||
websockify \
|
||||
openbox \
|
||||
xterm \
|
||||
procps \
|
||||
net-tools \
|
||||
curl \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
nano \
|
||||
x11vnc \
|
||||
xvfb \
|
||||
fluxbox \
|
||||
xdotool \
|
||||
oathtool \
|
||||
openconnect \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
vpnc-scripts \
|
||||
libasound2 \
|
||||
libnss3 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libxcomposite1 \
|
||||
libxrandr2 \
|
||||
libgbm1 \
|
||||
libxdamage1 \
|
||||
libpango-1.0-0 \
|
||||
fonts-liberation \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install openconnect-sso with playwright
|
||||
RUN python3 -m venv "$VIRTUAL_ENV" && \
|
||||
pip install --no-cache-dir openconnect-sso[full] playwright keyring keyrings.alt && \
|
||||
python -m playwright install --with-deps chromium
|
||||
|
||||
RUN mkdir -p /opt/scripts /shared
|
||||
|
||||
# Copy entrypoint script
|
||||
COPY scripts/entrypoint.sh /opt/scripts/
|
||||
RUN chmod +x /opt/scripts/entrypoint.sh
|
||||
|
||||
EXPOSE 5901 6092
|
||||
|
||||
CMD ["/opt/scripts/entrypoint.sh"]
|
||||
@@ -1,51 +0,0 @@
|
||||
# Rego Tunnel - Build Files
|
||||
|
||||
This directory contains the Dockerfile and scripts to build the Cisco VPN Docker image.
|
||||
|
||||
## Files
|
||||
|
||||
- `Dockerfile` - Docker image definition (Ubuntu 22.04 + Cisco Secure Client + noVNC)
|
||||
- `cisco-secure-client-full.tar.gz` - Pre-extracted Cisco Secure Client 5.1.14.145
|
||||
- `build.sh` - Build and push script
|
||||
- `scripts/entrypoint.sh` - Container entrypoint (starts systemd)
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
cd /etc/runtipi/repos/runtipi/apps/rego-tunnel/build
|
||||
./build.sh
|
||||
```
|
||||
|
||||
This builds and pushes to `git.alexzaw.dev/alexz/cisco-vpn:latest`
|
||||
|
||||
To build without pushing:
|
||||
```bash
|
||||
docker build -t git.alexzaw.dev/alexz/cisco-vpn:latest .
|
||||
```
|
||||
|
||||
## What's in the image
|
||||
|
||||
The Dockerfile creates an image with:
|
||||
- Ubuntu 22.04 with systemd
|
||||
- Cisco Secure Client 5.1.14.145 (VPN, DART, Posture modules)
|
||||
- TigerVNC server + noVNC (web-based VNC)
|
||||
- Tools: xdotool, oathtool (for TOTP), xclip, openbox
|
||||
|
||||
### Systemd services (baked in)
|
||||
- `vpnagentd.service` - Cisco VPN agent
|
||||
- `vnc.service` - VNC server + noVNC websockify
|
||||
|
||||
### Scripts (baked in via base64 in Dockerfile)
|
||||
- `/opt/scripts/startup-vnc.sh` - Starts VNC server and noVNC
|
||||
- `/opt/scripts/entrypoint.sh` - Container entrypoint
|
||||
|
||||
## Runtime mounts (from shared/)
|
||||
|
||||
When running as rego-tunnel app, these are mounted from `shared/`:
|
||||
- `/shared/cisco-vpn` - Main VPN automation script
|
||||
- `/shared/xstartup` → `/root/.vnc/xstartup` - VNC session startup
|
||||
|
||||
## Ports
|
||||
|
||||
- `5901` - VNC server
|
||||
- `6080` - noVNC web interface
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Build and push the Cistech VPN Docker image
|
||||
# Run this from the build directory
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
IMAGE_NAME="${IMAGE_NAME:-git.alexzaw.dev/alexz/cistech-vpn}"
|
||||
IMAGE_TAG="${IMAGE_TAG:-latest}"
|
||||
|
||||
echo "Building ${IMAGE_NAME}:${IMAGE_TAG}..."
|
||||
|
||||
docker build "$@" -t "${IMAGE_NAME}:${IMAGE_TAG}" .
|
||||
docker push "${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
|
||||
echo ""
|
||||
echo "Build complete!"
|
||||
echo ""
|
||||
echo "To test locally:"
|
||||
echo " docker run -d --privileged --cap-add=NET_ADMIN --device=/dev/net/tun -p 5901:5901 -p 6092:6092 ${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
echo ""
|
||||
echo "Then connect via VNC to localhost:5901 or open noVNC at http://localhost:6092/vnc.html"
|
||||
echo ""
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Entrypoint: VNC password setup + DNS fix + direct VNC start (no systemd)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export HOME='/root'
|
||||
export USER='root'
|
||||
export DISPLAY=:1
|
||||
|
||||
# Setup TigerVNC password file from env var (passed by runtipi)
|
||||
if [ -n "${VNC_PASSWORD:-}" ]; then
|
||||
mkdir -p /root/.vnc
|
||||
printf '%s\n%s\n' "$VNC_PASSWORD" "$VNC_PASSWORD" | vncpasswd -f > /root/.vnc/passwd
|
||||
chmod 600 /root/.vnc/passwd
|
||||
fi
|
||||
|
||||
# DNS fix
|
||||
cp /etc/resolv.conf /tmp/resolv.conf.bak 2>/dev/null || true
|
||||
cp /etc/hosts /tmp/hosts.bak 2>/dev/null || true
|
||||
umount /etc/resolv.conf 2>/dev/null || true
|
||||
umount /etc/hosts 2>/dev/null || true
|
||||
cat /tmp/resolv.conf.bak > /etc/resolv.conf 2>/dev/null || echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
cat /tmp/hosts.bak > /etc/hosts 2>/dev/null || echo "127.0.0.1 localhost" > /etc/hosts
|
||||
|
||||
# Enable IP forwarding
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
echo "[entrypoint] IP forwarding enabled"
|
||||
|
||||
# Clean up stale VNC locks
|
||||
rm -f /tmp/.X1-lock /tmp/.X11-unix/X1 2>/dev/null || true
|
||||
|
||||
# Start TigerVNC server
|
||||
echo "[entrypoint] Starting TigerVNC server on display :1..."
|
||||
vncserver :1 -geometry 1280x800 -depth 24 -SecurityTypes VncAuth -localhost no
|
||||
|
||||
sleep 2
|
||||
|
||||
# Start noVNC via websockify
|
||||
echo "[entrypoint] Starting noVNC on port ${NOVNC_PORT:-6092}..."
|
||||
websockify --web=/usr/share/novnc/ ${NOVNC_PORT:-6092} localhost:5901 &
|
||||
|
||||
echo "[entrypoint] VNC ready. Use noVNC at http://localhost:${NOVNC_PORT:-6092}/vnc.html"
|
||||
|
||||
# Keep container running and tail logs
|
||||
tail -f /root/.vnc/*.log 2>/dev/null || tail -f /dev/null
|
||||
Reference in New Issue
Block a user