Update Readme.md
All checks were successful
Build Docker Image on Commit / build-and-publish (push) Successful in 6s

This commit is contained in:
merith-tk 2025-06-05 17:26:22 +01:00
parent e12ca1dc2a
commit 59ba461aeb

View file

@ -1,36 +1,65 @@
# README for Docker Image Build and Publish Workflows
# 🖥️ GNS3 VNC Appliance Template
## Overview
> **Base Image**: `git.merith.xyz/gns3/base-vnc:latest`
Create custom VNC appliances for GNS3 with automatic startup scripts.
This repository contains two GitHub Actions workflows that automate the building and publishing of Docker images to an OCI registry.
---
### Workflows
## 🚀 Quick Start
1. **On Commit to Main**
- **Trigger:** Activates on commits to the `main` branch (tags are excluded).
- **Purpose:** Builds and publishes a Docker image for each commit.
1. **Clone the template**:
```bash
git clone https://git.merith.xyz/gns3/vnc-template.git
cd vnc-template
```
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`.
2. **Customize your appliance**:
```dockerfile
FROM git.merith.xyz/gns3/base-vnc:latest
## Prerequisites
## ADD YOUR CUSTOMIZATIONS HERE ##
RUN apk add --no-cache firefox-esr xterm
- **Secrets Needed:**
- `OCI_TOKEN`: Your OCI registry token.
- `OCI_USER`: Your OCI registry username.
## END CUSTOMIZATION ##
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
```
## How to Use
3. **Configure startup** (`entrypoint.sh`):
```bash
#!/bin/bash
# Start your applications automatically:
firefox & # Launch in background
xterm # Keep terminal open
```
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.
4. **Build and push**:
```bash
docker build -t your-registry/vnc-firefox:latest .
docker push your-registry/vnc-firefox:latest
```
## Notes
---
- Ensure your Docker environment is compatible with multi-platform builds if necessary.
## 🔧 GNS3 Appliance Configuration
## License
1. In GNS3, create new **Docker VM** template:
- **General Settings**:
- Name: `Your-Appliance-Name`
- Docker image: `your-registry/vnc-firefox:latest`
- **Network**:
- `eth0` = `Management` (NAT)
- Additional NICs as needed
- **Console**:
- Type: `VNC`
- Port: `5900`
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---
## 🧩 Key Components
| File | Purpose |
|------------------|-------------------------------------------------------------------------|
| `Dockerfile` | Extends base image with your custom tools |
| `entrypoint.sh` | **Auto-starts** when appliance boots (launch your apps/services here) |
| `i3.config` | (In base image) Auto-runs `/entrypoint.sh` on startup |