#38 hexagonal: dockerizing
This commit is contained in:
5
bobby-pay/Dockerfile
Normal file
5
bobby-pay/Dockerfile
Normal 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"]
|
||||
@@ -38,6 +38,7 @@ subprojects {
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
maxHeapSize = "1024m"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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])
|
||||
}
|
||||
Reference in New Issue
Block a user