kostis-codefresh / dockerize-latest-version

Create automatically a Docker image from a Github release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create Dockerhub images from Github releases

Go Report Card Codefresh build status

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

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

Currently it runs every 6 hours and pushes images to https://hub.docker.com/r/kostiscodefresh/glooctl/ and https://hub.docker.com/r/kostiscodefresh/kubectl-argo-rollouts

About

Create automatically a Docker image from a Github release


Languages

Language:Go 93.4%Language:Dockerfile 4.6%Language:Makefile 2.0%