https://github.com/kostis-codefresh/dockerize-latest-version
Create automatically a Docker image from a Github release
https://github.com/kostis-codefresh/dockerize-latest-version
docker dockerhub github
Last synced: about 1 month ago
JSON representation
Create automatically a Docker image from a Github release
- Host: GitHub
- URL: https://github.com/kostis-codefresh/dockerize-latest-version
- Owner: kostis-codefresh
- Created: 2021-02-02T14:43:14.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-16T11:27:21.000Z (about 5 years ago)
- Last Synced: 2025-02-08T23:15:42.233Z (over 1 year ago)
- Topics: docker, dockerhub, github
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create Dockerhub images from Github releases
[](https://goreportcard.com/report/github.com/kostis-codefresh/dockerize-latest-version)
[]( https://g.codefresh.io/pipelines/edit/new/builds?id=6026be2d0ec1b47e060d3980&pipeline=dockerize-github-release&projects=my-plugins&projectId=6026be05d65b217adde97a71)
This is a mini CLI + Container image to check if a github release is newer than the respective Dockerhub image.
If it is then it downloads the github asset so that you can create a Docker image out of it.
## How to build
Run:
* `go build` to get the executable OR
* `docker build . -t dockerize-latest-version` to create a container image if you prefer docker instead or don't have access to a Go dev environment
A prebuilt image is already available at [https://hub.docker.com/r/kostiscodefresh/dockerize-latest-version](https://hub.docker.com/r/kostiscodefresh/dockerize-latest-version)
## How to use the CLI
This CLI can be used like
Run `dockerize-latest-release --repo argoproj/argo-rollouts -asset kubectl-argo-rollouts-linux-amd64 -image kostiscodefresh/argo-rollouts-cli `. This will fetch the github details and save them to a file called `asset-details.json`. It will also download `kubectl-argo-rollouts-linux-amd64` locally
You can use this CLI in any CI/CD system and the Dockerhub image in any container based pipeline.
## Codefresh example
See an example for Codefresh at [codefresh-example.yml](codefresh-example.yml)
Currently it runs every 6 hours and pushes images to [https://hub.docker.com/r/kostiscodefresh/glooctl/](https://hub.docker.com/r/kostiscodefresh/glooctl/) and [https://hub.docker.com/r/kostiscodefresh/kubectl-argo-rollouts](https://hub.docker.com/r/kostiscodefresh/kubectl-argo-rollouts)