-
Notifications
You must be signed in to change notification settings - Fork 78
/
docker-bake.hcl
154 lines (117 loc) · 2.92 KB
/
docker-bake.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
variable "POSTGRES_REPO" {
default = "ghcr.io/hydrasdb/hydra"
}
variable "SPILO_REPO" {
default = "011789831835.dkr.ecr.us-east-1.amazonaws.com/spilo"
}
variable "SPILO_VERSION" {
default = "2.1-p7"
}
variable "POSTGRES_BASE_VERSION" {
default = "14"
}
variable "SPILO_POSTGRES_VERSION" {
default = "14"
}
variable "SPILO_POSTGRES_OLD_VERSIONS" {
default = "13"
}
group "default" {
targets = ["postgres", "spilo"]
}
target "shared" {
platforms = [
"linux/amd64",
"linux/arm64/v8"
]
}
target "postgres" {
inherits = ["shared"]
contexts = {
postgres_base = "docker-image://postgres:${POSTGRES_BASE_VERSION}"
columnar = "target:columnar_${POSTGRES_BASE_VERSION}"
http = "target:http_${POSTGRES_BASE_VERSION}"
}
tags = [
"${POSTGRES_REPO}:latest",
"${POSTGRES_REPO}:${POSTGRES_BASE_VERSION}-latest"
]
cache-to = ["type=local,dest=tmp/bake_cache/postgres"]
cache-from = ["type=local,src=tmp/bake_cache/postgres"]
}
target "spilo" {
inherits = ["shared"]
dockerfile = "Dockerfile.spilo"
contexts = {
spilo_base = "target:spilo_base"
columnar_13 = "target:columnar_13"
columnar_14 = "target:columnar_14"
http_13 = "target:http_13"
http_14 = "target:http_14"
}
args = {
POSTGRES_BASE_VERSION = "${SPILO_POSTGRES_VERSION}"
}
tags = [
"${SPILO_REPO}:latest",
"${SPILO_REPO}:${SPILO_VERSION}-latest"
]
cache-to = ["type=local,dest=tmp/bake_cache/spilo"]
cache-from = ["type=local,src=tmp/bake_cache/spilo"]
}
target "spilo_base" {
inherits = ["shared"]
context = "https://github.com/zalando/spilo.git#${SPILO_VERSION}:postgres-appliance"
args = {
TIMESCALEDB = ""
PGVERSION = "${SPILO_POSTGRES_VERSION}"
PGOLDVERSIONS = "${SPILO_POSTGRES_OLD_VERSIONS}"
}
cache-to = ["type=local,dest=tmp/bake_cache/spilo_base"]
cache-from = ["type=local,src=tmp/bake_cache/spilo_base"]
}
target "http" {
inherits = ["shared"]
context = "http"
target = "output"
args = {
PGSQL_HTTP_TAG = "v1.5.0"
}
}
target "http_13" {
inherits = ["http"]
args = {
POSTGRES_BASE_VERSION = 13
}
cache-to = ["type=local,dest=tmp/bake_cache/http_13"]
cache-from = ["type=local,src=tmp/bake_cache/http_13"]
}
target "http_14" {
inherits = ["http"]
args = {
POSTGRES_BASE_VERSION = 14
}
cache-to = ["type=local,dest=tmp/bake_cache/http_14"]
cache-from = ["type=local,src=tmp/bake_cache/http_14"]
}
target "columnar" {
inherits = ["shared"]
context = "columnar"
target = "output"
}
target "columnar_13" {
inherits = ["columnar"]
args = {
POSTGRES_BASE_VERSION = 13
}
cache-to = ["type=local,dest=tmp/bake_cache/columnar_13"]
cache-from = ["type=local,src=tmp/bake_cache/columnar_13"]
}
target "columnar_14" {
inherits = ["columnar"]
args = {
POSTGRES_BASE_VERSION = 14
}
cache-to = ["type=local,dest=tmp/bake_cache/columnar_14"]
cache-from = ["type=local,src=tmp/bake_cache/columnar_14"]
}