Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bokysan/tool-downloader
Download (go) cli tools from GitHub
https://github.com/bokysan/tool-downloader
calico cli docker dockerfiles download downloader github go go-ipfs ipfs istioctl k3s kops tool tools
Last synced: 16 days ago
JSON representation
Download (go) cli tools from GitHub
- Host: GitHub
- URL: https://github.com/bokysan/tool-downloader
- Owner: bokysan
- License: apache-2.0
- Created: 2020-07-28T10:21:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-16T18:15:01.000Z (over 4 years ago)
- Last Synced: 2024-12-20T23:42:11.780Z (about 2 months ago)
- Topics: calico, cli, docker, dockerfiles, download, downloader, github, go, go-ipfs, ipfs, istioctl, k3s, kops, tool, tools
- Language: Shell
- Homepage:
- Size: 43 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# (GitHub) tool downloader
## What is this
This is a Docker image / bash script to download tools (mostly written in Go) into your image.
## Why
Because I got tired of writting the same script over and over again. Most newer tools do not have an installer anymore but just point you to download the binary from their GitHub page.
## How to use
Usually, you'll want do this as a step of your Docker build, e.g.:
```Dockerfile
# ≡≡≡≡≡≡≡≡≡≡≡≡ Download executable ≡≡≡≡≡≡≡≡≡≡≡≡
FROM boky/tool-downloader AS hetzner-kubeRUN \
env \
PROJECT='xetys/hetzner-kube' \
DOWNLOAD_TEMPLATE='https://github.com/${PROJECT}/releases/download/${VERSION}/${NAME}-${VERSION}-${GOOS}-${GOARCH}${GOEXT}' \
tool-downloader# ≡≡≡≡≡≡≡≡≡≡≡≡ Create your image for install-less usage on your computer ≡≡≡≡≡≡≡≡≡≡≡≡
FROM scratch
COPY --from=hetzner-kube /usr/local/bin/hetzner-kube /usr/local/bin# ≡≡≡≡≡≡≡≡≡≡≡≡ Embed into your image ≡≡≡≡≡≡≡≡≡≡≡≡
FROM python:latest
...
COPY --from=hetzner-kube /usr/bin/hetzner-kube /usr/bin
```See more usage examples in the `tools` folder.
## Configuration options
Most of the time, you will need to provide the `$PROJECT` (GitHub project name) and `$DOWNLOAD_TEMPLATE` and the tool will download the latest version.
To fix the specific version, set the `$VERSION` field.