Compare commits

..

No commits in common. "main" and "v0.1.0" have entirely different histories.
main ... v0.1.0

3 changed files with 26 additions and 50 deletions

View file

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

View file

@ -1,47 +1,36 @@
# 🧱 i3 Base Image for GNS3 (VNC) # README for Docker Image Build and Publish Workflows
> **Base for**: [vnc-template](https://git.merith.xyz/gns3/vnc-template) ## Overview
Minimal Alpine-based Docker image with i3 window manager for GNS3 VNC appliances.
--- This repository contains two GitHub Actions workflows that automate the building and publishing of Docker images to an OCI registry.
## 🛠 Core Features ### Workflows
- **<50MB** Alpine base with i3 window manager 1. **On Commit to Main**
- Automatic DHCP configuration (`udhcpc`) - **Trigger:** Activates on commits to the `main` branch (tags are excluded).
- Extensible design for lab environments - **Purpose:** Builds and publishes a Docker image for each commit.
--- 2. **On Tag Push**
- **Trigger:** Activates when a new tag is pushed.
- **Purpose:** Builds and publishes a Docker image for the tag and tags it as `latest`.
## 🏷️ Image Tags ## Prerequisites
| Tag | Description | - **Secrets Needed:**
|------------|-----------------------------------| - `OCI_TOKEN`: Your OCI registry token.
| `latest` | Stable release (`vX.X.X`) | - `OCI_USER`: Your OCI registry username.
| `nightly` | Latest `main` branch commit |
| `<commit>` | Immutable build (e.g. `427726ea`) |
--- ## How to Use
## ▶️ Usage with vnc-template 1. **Clone the Repository:** Get a local copy of this repository.
2. **Modify Dockerfile:** Update the `Dockerfile` for your application.
3. **Push Changes:** Push changes to the `main` branch or create a new tag.
4. **Check Workflow Status:** View the Actions tab in Forgjo to monitor workflow runs.
1. Reference this image in your `Dockerfile`: ## Notes
```Dockerfile
FROM git.merith.xyz/gns3/vnc-template
```
2. Add custom tools and configs in [vnc-template](https://git.merith.xyz/gns3/vnc-template): - Ensure your Docker environment is compatible with multi-platform builds if necessary.
```Dockerfile
RUN apk add firefox wireshark
COPY my-configs /etc/
```
3. Auto start programs by adding your own entrypoint ## License
```Dockerfile
COPY custom-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
```
> **⚠️ Do _not_ add an `ENTRYPOINT` line in your `Dockerfile`.**
> The base image already defines the required entrypoint for proper operation in GNS3.
See [vnc-template repository](https://git.merith.xyz/gns3/vnc-template) for full appliance creation guide. This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

13
vnc.sh
View file

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