This page contains step-by-step instructions on how to get started with Docker
Two ways to install docker
1. Download and install Docker Desktop
2. Linux Machine
Need help Checkout Docker Setup
Docker Server
Two things we can do in docker server
1. We can create image
app code + software
2. we can create a container from image
Runtime instance of our application.
Docker build process
1. Clone github project -local
https://github.com/DevOpsChandraSekhar/java-web-app-docker
2. Install openjdk
sudo apt install openjdk-8-jdk-headless -y
3. Install maven the same way
sudo apt install maven -y
4. Next step you have to build project using
mvn clean package
5. Find war file in target folder
6. To check what is available inside docker file use
cat Dockerfile
7. Then build docker image
docker build -t myimage/java-web-app:1 .
8. Now docker image is ready and verify using
docker images
that's it Docker image is ready and you are ready to run that image.
keep reading for updates.