The Advanced Guide to Build Image From Dockerfile Docker Basics


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


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.


Chandra Sekhar

A Blogger and Author! This post was written and edited by me, a technologist. I started this site to share my inspirations, work, and free materials, which I hope others may find useful as well. Man with a creative streak who enjoys experimenting with various web design strategies.

Previous Post Next Post

Microservice Communication in a Distributed System