- You can push docker image through command line as below:
- docker tag <url_of_docker_registry>/image_name:image_tag
- docker login -u username -p paswword <url_of_docker_registry>
- docker push <url_of_docker_registry>/image_name:image_tag
2. Push docker image through jenkins:
i. Download CloudBees Docker Build and Publish plugin.
Go to Manage Jenkins -> Manage Plugins -> Available (search for CloudBees Docker Build and Publish plugin) -> Install without restart.
ii. In jenkins job configuration select build step as Docker Build and Publish
- Repository Name : name_of_your_repo
- Tag : tag_for_docker_image
- Docker registry URL : url of your docker registry hosted on nexus OSS
- Registry credentials : credetials for your docker registry