Skip to content

youg9203/spring-boot-docker-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Docker Example

Build the project

$ ./mvnw package

OR

$ mvn clean package

Build the docker image

$ docker build -t springio/gs-spring-boot-docker .

Run the docker image

$ docker run -p 8080:8080 springio/gs-spring-boot-docker

Open another terminal and use below command

$ curl localhos:8080

OR open in the browser the above link.

Docker file

FROM openjdk:8-jdk-alpine

ARG JAR_FILE=target/*.jar

COPY ${JAR_FILE} app.jar

ENTRYPOINT ["java","-jar","/app.jar"]

The image size of above docker and libraries is 122MB

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published