Answer the question
In order to leave comments, you need to log in
How to versionize docker containers in jenkins?
Hello!
In our company, ci / cd is configured on jenkins. After pushing from gitlaba, the project goes to the docker container, unfolds there and you can already watch it ready in the browser.
But the developers asked me to create assembly versioning using the docker registry. They want to commit containers from each build to the docker registry (of course with some sort of identifying tag).
As a docker registry, I chose nexus repository manager. At this stage, I stopped, because I don’t know which direction to look, and I don’t even know which automation tools I should use ..
I think it’s at least not professional to do this with a bash script. build versioning builds of docker containers?
Answer the question
In order to leave comments, you need to log in
If you don't like bash scripts, switch to Teamcity and/or look for plugins that replace bash scripts.
Tools - build id in Jenkins, Docker, Nexus, brain, input device (one of each is enough).
docker tag image_id $registry_addr/$image_name:"$BUILD_NUMBER"
docker push $registry_addr/$image_name:"$BUILD_NUMBER"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question