From e3bd0b13580762876b8d8ba39c0523f213435c2b Mon Sep 17 00:00:00 2001 From: Tordarus Date: Fri, 6 Jun 2025 15:31:02 +0200 Subject: [PATCH] improved readme and added license --- LICENSE | 21 +++++++++++++++ README.md | 78 +++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 82 insertions(+), 17 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..98bebbf --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Tordarus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index 51039cf..876d268 100644 --- a/README.md +++ b/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)