Skip to content

awsstudygroup2021/Spring-app-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Các bước build ứng dụng với Dockerfile

Chia làm 2 stage:

  1. Stage 1
  • Sử dụng base image maven:ibmjava-alpine

  • Copy source code vào image

  • Từ source code build ra file websocket-demo-0.0.1-SNAPSHOT.jar bằng lệnh: mvn clean package.

  • File websocket-demo-0.0.1-SNAPSHOT.jar sẽ nằm trong thư mục target của source code

  1. Stage 2
  • Sử dụng base image openjdk:8-alpine

  • Copy file websocket-demo-0.0.1-SNAPSHOT.jar từ stage 1 sang stage 2

  • Dùng lệnh sau để start container: java -Djava.security.egd=file:/dev/./urandom -jar websocket-demo-0.0.1-SNAPSHOT.jar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published