-
Notifications
You must be signed in to change notification settings - Fork 70
How to push Dockerfile to docker hub
Roman Ivanov edited this page Dec 23, 2019
·
18 revisions
-
create user on docker hub (become part of "checkstyle" organization)
-
At folder
sonar-checkstyle/checkstyle-sonar-plugin/config
do
docker rm sonarqube-X.X-community
docker build -t sonarqube-maven-git .
launch it and make sure it works
docker run -d --name sonarqube-X.X-community -p 9000:9000 -p 9092:9092 sonarqube-maven-git
recheck that service is up - http://localhost:9000/about
do commit of Dockerfile , and store commit SHA for tag creation (see next step)
git add .
git commit -m "config: update sonarqube base image to X.X-community"
git push origin master
git rev-parse --short HEAD
-
docker tag sonarqube-maven-git:latest checkstyle/sonarqube-maven-git:X.X-community-<SHA>
-
docker login --username=<user username>
-
docker push checkstyle/sonarqube-maven-git
Image location - https://hub.docker.com/r/checkstyle/sonarqube-maven-git/