initial commit
This commit is contained in:
39
README.md
Normal file
39
README.md
Normal file
@ -0,0 +1,39 @@
|
||||
# 🐳 Go Builder & Runner Docker Image
|
||||
|
||||
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`).
|
||||
|
||||
---
|
||||
|
||||
## ✅ 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
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Example Usage
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
## 🔧 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 |
|
||||
|
||||
## 📄 License
|
||||
|
||||
MIT License – feel free to modify and use.
|
Reference in New Issue
Block a user