-
Notifications
You must be signed in to change notification settings - Fork 338
/
build.gradle
59 lines (49 loc) · 1.4 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.1'
id 'io.spring.dependency-management' version '1.0.12.RELEASE'
id 'com.google.cloud.tools.jib' version '3.3.1'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:2.7.1'
implementation 'org.springframework.boot:spring-boot-starter-web:2.7.1'
developmentOnly 'org.springframework.boot:spring-boot-devtools:2.7.1'
}
repositories {
mavenCentral()
}
version = '0.0.1-SNAPSHOT'
description = 'test-docker-spring-boot'
group = 'com.test'
java.sourceCompatibility = JavaVersion.VERSION_11
jar {
enabled = false
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
jib {
from {
image = 'adoptopenjdk/openjdk11:alpine-jre'
}
to {
image = '<Docker Hub Repository URL>'
tags = ['<TAG Name>']
}
container {
entrypoint = ['java', '-Dspring.profiles.active=test', '-jar', 'test-docker-spring-boot-0.0.1-SNAPSHOT.jar']
jvmFlags = ['-Xms512m', '-Xmx512m', '-Xdebug', '-XshowSettings:vm', '-XX:+UnlockExperimentalVMOptions', '-XX:+UseContainerSupport']
ports = ['8080']
environment = [SPRING_OUTPUT_ANSI_ENABLED: "ALWAYS"]
labels = [version:project.version, name:project.name, group:project.group]
creationTime = 'USE_CURRENT_TIMESTAMP'
format = 'Docker'
}
extraDirectories {
paths {
path {
from = file('build/libs')
}
}
}
}