Dockerizing Spring boot application

Chamith Kodikara
Jun 12 · 6 min read

First lets see what Dockerizing is…

Application containerization (app containerization)


host:port/test

Dockerfile

docker build -t boot-docker-demo .
The Docker image is created

docker-maven-plugin

mvnw install dockerfile:build
docker run -p 8080:8080 -t your_docker_image_name
docker run -e "SPRING_PROFILES_ACTIVE=prod" -p 8080:8080 -t image_name

The Startup

Medium's largest active publication, followed by +469K people. Follow to join our community.

Chamith Kodikara

Written by

Senior Software Engineer @ Efutures, Tech enthusiast, Java programmer, love traveling & photography

The Startup

Medium's largest active publication, followed by +469K people. Follow to join our community.