Deploying Spring Based WAR Application to Docker
Docker Tutorial - Table Of Contents
Docker Deploying Spring Based WAR Application to Docker Deploying Spring Based JAR Application to Docker Deploying Multiple Spring Boot Microservices using Docker Networking Deploying Multiple Spring Boot Microservices using Docker Compose Deploying Spring Boot + MYSQL Application to Docker Publishing Docker Image to DockerHub Deploy Docker Swarm services using Play With Docker Deploy Docker Swarm services using Docker Stack Deploy Docker Swarm services to multiple AWS EC2 instances Docker Cheat Sheet
Video
This tutorial is explained in the below Youtube Video.We will be creating an image for deploying this war application to tomcat.

Create the dockerfile. Docker file is a list of commands that we want the docker engine to execute. We will be needing a tomcat image using which we will be deploying our application. Go to dockerhub and search tomcat, we will be using official tomcat images. Here since we are using jdk 8 so we select alpine 8.

Go to the spring boot project folder and create a docker file as follows-
From tomcat:8.0.51-jre8-alpine CMD ["catalina.sh","run"]

Open the terminal and install the docker
yum install docker