Skip to main content

Command Palette

Search for a command to run...

Dockerization Spring-boot Application

โˆž ... DEVOPS X DOCKER ...๐Ÿฌ

Updated
โ€ข1 min readโ€ขView as Markdown
Dockerization Spring-boot Application

Dockerization

Docker: - Docker is a platform designed to help developer build ,share and run modern application .

Docker file :- It is a text document , that contain all the commands a user could call on the comand line to assemble an image.

Dockerization : - The process of packing , deploying and running application using Docker containers

Step 1: - Create a REST api in spring boot application and perform the CRUD operation

GitHub code source :- https://github.com/SourabhAswal/springboot-docker.git

Step 2: - Create a docker file in the project folder

FROM openjdk:17-oracle
EXPOSE 8080
COPY target/springboot-docker.jar springboot-docker.jar
ENTRYPOINT ["java","-jar" ,"springboot-docker.jar"]

Step 3: Create a docker image from the docker file , which we created earlier

Before that you have to build a project so that it will create .jar file by using :

mvn clean install

docker build . -t springboot-docker:latest

Step 4 : Now we have to run that docker image

docker run -p 8080 springboot-docker

Step 5: Checking that REST api in postman tool ( Dockerization of Springboot- application completed )

More from this blog

๐“๐ก๐ž ๐’๐ญ๐จ๐ซ๐ฒ ๐๐ž๐ก๐ข๐ง๐ ๐ญ๐ก๐ž ๐Š๐ฎ๐›๐ž๐ซ๐ง๐ž๐ญ๐ž๐ฌ ๐ฏ๐Ÿ.๐Ÿ‘๐Ÿ• "๐†๐š๐ซ๐ก๐ฐ๐š๐ฅ" ๐‹๐จ๐ ๐จ

Every Kubernetes release carries a theme, and v1.37's is Garhwal ๐Ÿ‡ฎ๐Ÿ‡ณ โ€” a Himalayan region of Uttarakhand known for its snow-capped peaks โ›ฐ๏ธ, deodar forests ๐ŸŒฒ, terraced fields ๐ŸŒพ, and mountain stream

Sep 2, 20261 min read
๐“๐ก๐ž ๐’๐ญ๐จ๐ซ๐ฒ ๐๐ž๐ก๐ข๐ง๐ ๐ญ๐ก๐ž ๐Š๐ฎ๐›๐ž๐ซ๐ง๐ž๐ญ๐ž๐ฌ ๐ฏ๐Ÿ.๐Ÿ‘๐Ÿ• "๐†๐š๐ซ๐ก๐ฐ๐š๐ฅ" ๐‹๐จ๐ ๐จ

Untitled Publication

9 posts