Shows how to deploy the Spring boot app in a container based deployment framework using Docker. Here added Docker file in the project file. After downloading run the below command using docker.
Build a Docker image
sudo docker build -f Dockerfile -t springboottag .
See Docker images
sudo docker image ls
run the docker command and container will start
sudo docker run -p 8080:8080 springboottag
List out any running containers in the docker
sudo docker ps
List out all containers details
sudo docker ps -a
Login in dockerhub repository
sudo docker login
create a tag
sudo docker tag springbootdockertag <dockerId>/springboottag:latest
push the tag in to docker hub
docker push <dockerId>/springboottag:latest
Funally docker pull command
docker pull <dockerId>/springboottag