Sign inSign up

keinos/get-my-version

By keinos

Updated over 5 years ago

Just returns app version of git tagged.

Image
0

624

keinos/get-my-version repository overview

Golang versioning with git-tag on Docker Cloud

Don't want to define app version statically in your files?

I don't. I want to use the version defined in git tag and include them during the automated build on Docker Cloud.

So, this is a sample to see how to include them during the build on Docker Cloud and release it on Docker Hub.

docker pull keinos/get-my-version
$ docker pull keinos/get-my-version
...
$ docker run --rm keinos/get-my-version
v0.0.1-20190531.1548
$
$ docker run --rm -it --entrypoint /bin/sh keinos/get-my-version
/ # which get-my-version
/usr/local/bin/get-my-version
/ #
/ # get-my-version
/ # v0.0.1-20190531.1548
/ #
/ # exit
$

Tag summary

Content type

Image

Digest

Size

3.3 MB

Last updated

over 5 years ago

docker pull keinos/get-my-version