#38 hexagonal: dockerizing

This commit is contained in:
haerong22
2023-07-20 18:47:11 +09:00
parent d33869db03
commit 4eb93bc538
3 changed files with 15 additions and 2 deletions

5
bobby-pay/Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM openjdk:11-slim-stretch
EXPOSE 8080
ARG JAR_FILE
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java", "-jar", "/app.jar"]

View File

@@ -38,6 +38,7 @@ subprojects {
test {
useJUnitPlatform()
maxHeapSize = "1024m"
}
}

View File

@@ -1,3 +1,6 @@
plugins {
id 'com.palantir.docker' version '0.25.0'
}
group 'org.example.membership'
version '1.0-SNAPSHOT'
@@ -21,6 +24,10 @@ dependencies {
runtimeOnly 'com.h2database:h2'
}
test {
useJUnitPlatform()
docker {
println(tasks.bootJar.outputs.files)
name rootProject.name + '-' + project.name + ":" + version
dockerfile file('../Dockerfile')
files tasks.bootJar.outputs.files
buildArgs(['JAR_FILE': tasks.bootJar.outputs.files.singleFile.name])
}