-
cd spring-jenkins
-
mvn clean install
-
docker build -t mydockerusername/nameOfDockerImage:tagName . Once the image has been build successfully
-
docker images
-
docker run -p 8080:8080 -t mydockerusername/nameOfDockerImage:tagName(or ImageID)
-
docker ps
-
To expose this APi via web : https://ngrok.com/download
-
docker run -p portThatuWantToExpose:PortMentionedinDockerFile ${imageID}
-
docker stop ${containerId}
-
docker start ${containerId}
-
docker run -p 9122:8080 -d ${imageID}
-
docker rm ${containerId}
-
docker rmi ${imageId}
-
docker login
-
docker push dockerUsername/dockerImageName:tagName