harbur / captain

Captain - Convert your Git workflow to Docker :whale: containers
MIT License
766 stars 51 forks source link

Custom tag and Push to private repository #58

Open rajugupta15 opened 8 years ago

rajugupta15 commented 8 years ago

Can i assign custom tag while build and push it to same private repository ?

dkapanidis commented 8 years ago

All git tags are converted to docker tags, so by git tagging your repository and push it, the same tag will be created on docker.

Does this resolve your use-case?

rajugupta15 commented 8 years ago

I have my custom version number and that number i want to use as tag, which is not related to git. Is there any possibility to use custom number as tag ? And i didn't see any option to push image private docker registry ?

dkapanidis commented 8 years ago

The custom version number I suppose is the version of your application you want to release. Is there a specific reason why not to use git tag to mark the version on your git repository? Otherwise how would you know how to trace back to the specific commit origin of the versioned application?

As for the private repo, if you configure the captain.yml image to point to a private repository and do captain push the images will be pushed to that repository.

rajugupta15 commented 8 years ago

We are using very long git tag (example : release/test1_1.0, release/test2_1.0), In this case, i want to use 1.0 as docker image tag. For private registry push, I am able to push to private registry. Thanks

paddie commented 8 years ago

@spiddy our use-case is using the CI's build-version as the version on the docker-image, and then we propogate that version back to github (only when merging to master). So essentially, we build an image on every push to a branch and run tests, but only update the version when merged to master, and then using the version in the CI (travis).

So, either using an environment variable or something similar to tag the release such as <repo-name>:$build_version would be briliant.