Skip to content

Commit

Permalink
IMG-14 feat: Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
MrExplode committed Nov 6, 2023
1 parent f11f27b commit e895809
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM gradle:jdk21-alpine AS builder

WORKDIR /app

COPY . .
RUN gradle build --no-daemon

FROM eclipse-temurin:21-jre-alpine as runner

WORKDIR /app
COPY --from=builder /app/build/libs/backend.jar .

CMD [ "java", "-jar", "backend.jar" ]
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.session:spring-session-core'

testImplementation group: 'com.h2database', name: 'h2', version: '2.2.224'
implementation group: 'org.jetbrains', name: 'annotations', version: '24.0.1'
implementation group: 'com.h2database', name: 'h2', version: '2.2.224'
implementation group: 'org.jetbrains', name: 'annotations', version: '24.0.1'



Expand All @@ -40,3 +40,8 @@ dependencies {
test {
useJUnitPlatform()
}

jar {
archiveClassifier.set('')
archiveVersion.set('')
}

0 comments on commit e895809

Please sign in to comment.