-
Notifications
You must be signed in to change notification settings - Fork 2
/
ctp.pkr.hcl
51 lines (51 loc) · 1.16 KB
/
ctp.pkr.hcl
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
build {
name = "ctp"
sources = [
"source.docker.ctp"
]
provisioner "file" {
sources = [
"CTP-installer.jar",
"config-serveronly.xml",
"Launcher.properties",
"entrypoint.sh"
]
destination = "/tmp/"
}
provisioner "shell" {
inline = [
"apt update",
"mkdir -p /JavaPrograms/ && cd /JavaPrograms",
"jar xf /tmp/CTP-installer.jar CTP",
"mv /tmp/config-serveronly.xml /JavaPrograms/CTP/config.xml",
"mv /tmp/Launcher.properties /JavaPrograms/CTP/",
"rm -f /tmp/CTP-installer.jar"
]
}
post-processors {
post-processor "docker-tag" {
repository = var.repo
tags = var.tag
}
# post-processor "docker-push" {
# only = ["docker.ctp"]
# }
}
}
variable "repo" {
type = string
}
variable "tag" {
type = list(string)
}
source "docker" "ctp" {
image = "openjdk:8u322-jdk-slim-bullseye"
commit = true
changes = [
"LABEL org.opencontainers.image.source https://github.com/australian-imaging-service/ctp-build",
"USER root",
"EXPOSE 1080 1443 25055",
"WORKDIR /JavaPrograms/CTP",
"ENTRYPOINT [\"/bin/bash\", \"/tmp/entrypoint.sh\"]"
]
}