improved readme and added license
This commit is contained in:
78
README.md
78
README.md
@ -2,42 +2,86 @@
|
||||
|
||||
This Docker image is designed to **download**, **compile**, and **run** a Go program from a Git repository entirely at **container runtime**. It supports both public and private repositories and works seamlessly across multiple architectures (`amd64`, `arm64`).
|
||||
|
||||
🏗️ **Built on Alpine Linux** for a minimal, efficient footprint.
|
||||
|
||||
---
|
||||
|
||||
## ✅ Features
|
||||
|
||||
- ✅ Clones a Go repository at runtime
|
||||
- ✅ Supports **private Git repositories** using `.netrc`-based auth
|
||||
- ✅ Builds and runs your Go application
|
||||
- ✅ Multi-architecture: `linux/amd64`, `linux/arm64`
|
||||
- ✅ Minimal and reproducible container setup
|
||||
* ✅ Clones a Go repository at runtime
|
||||
* ✅ Supports **private Git repositories** using `.netrc`-based auth
|
||||
* ✅ Builds and runs your Go application
|
||||
* ✅ Multi-architecture: `linux/amd64`, `linux/arm64`
|
||||
* ✅ Minimal and reproducible container setup with Alpine Linux
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Example Usage
|
||||
|
||||
### 🐚 Docker CLI
|
||||
|
||||
```bash
|
||||
docker run --rm \
|
||||
-e GIT_REPO=https://github.com/youruser/your-go-app.git \
|
||||
-e GIT_USERNAME=yourusername \
|
||||
-e GIT_TOKEN=yourtoken \
|
||||
gorunner:latest
|
||||
tordarus/gorunner:latest
|
||||
```
|
||||
|
||||
### 🐳 Docker Compose
|
||||
|
||||
Create a `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
version: "3.9"
|
||||
services:
|
||||
gorunner:
|
||||
image: tordarus/gorunner:latest
|
||||
environment:
|
||||
GIT_REPO: https://github.com/youruser/your-go-app.git
|
||||
GIT_USERNAME: yourusername # Optional for public repos
|
||||
GIT_TOKEN: yourtoken # Optional for public repos
|
||||
APP_PATH: . # Optional
|
||||
PACKAGES: curl # Optional
|
||||
```
|
||||
|
||||
Then run it with:
|
||||
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Environment Variables
|
||||
|
||||
| Variable | Required | Description |
|
||||
| ---------------------- | -------- | ----------------------------------------------------------------------- |
|
||||
| `GIT_REPO` | ✅ Yes | The HTTPS Git URL of your Go project |
|
||||
| `GIT_USERNAME` | Optional | Your Git username (required for private repos) |
|
||||
| `GIT_TOKEN` | Optional | A personal access token or password (required for private repos) |
|
||||
| `APP_PATH` | Optional | Relative path to the Go module directory inside the repo (default: `.`) |
|
||||
| `PACKAGES` | Optional | Comma-separated list of packages to install with `apk` before execution |
|
||||
| Variable | Required | Description |
|
||||
| -------------- | -------- | ----------------------------------------------------------------------- |
|
||||
| `GIT_REPO` | ✅ Yes | The HTTPS Git URL of your Go project |
|
||||
| `GIT_USERNAME` | Optional | Your Git username (required for private repos) |
|
||||
| `GIT_TOKEN` | Optional | A personal access token or password (required for private repos) |
|
||||
| `APP_PATH` | Optional | Relative path to the Go module directory inside the repo (default: `.`) |
|
||||
| `PACKAGES` | Optional | Comma-separated list of packages to install with `apk` before execution |
|
||||
|
||||
---
|
||||
|
||||
## 📦 Docker Hub
|
||||
|
||||
👉 Pull the image from Docker Hub:
|
||||
**[tordarus/gorunner](https://hub.docker.com/r/tordarus/gorunner)**
|
||||
|
||||
---
|
||||
|
||||
## 🔗 Source Repository
|
||||
|
||||
View the source code:
|
||||
👉 [https://git.tordarus.net/tordarus/gorunner](https://git.tordarus.net/tordarus/gorunner)
|
||||
|
||||
Found a bug or have an idea for improvement?
|
||||
🛠️ [Create an issue](https://git.tordarus.net/tordarus/gorunner/issues) in the repository.
|
||||
|
||||
---
|
||||
|
||||
## 📄 License
|
||||
|
||||
MIT License – feel free to modify and use.
|
||||
|
||||
## 📦 Repository
|
||||
|
||||
You can find the code for this image at [https://git.tordarus.net/tordarus/gorunner](https://git.tordarus.net/tordarus/gorunner)
|
||||
|
Reference in New Issue
Block a user