-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-bake.hcl
121 lines (105 loc) · 3.04 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
group "default" {
targets = [
"protoc-base",
"cpp-client-base",
"cpp-clients-multi-base",
]
}
group "release" {
targets = [
"protoc-base-release",
"cpp-client-base-release",
"cpp-clients-multi-base-release",
]
}
variable "REPO_PREFIX" {
default = "ghcr.io/deephaven/"
}
variable "CACHE_PREFIX" {
default = "deephaven-base-images-2-"
}
variable "TAG" {
default = "latest"
}
#
# cpp-client and cpp-clients-multi variables
#
# Passed to cmake as CMAKE_BUILD_TYPE
# Typically 'Debug','Release', or 'RelWithDebInfo'.
# 'Debug' may be convenient in some manual/development
# settings, but is considerably more expensive in terms
# of space and also somewhat more expensive in build time.
# So we default to 'Release'.
variable "BUILD_TYPE" {
default = "Release"
}
#
# The base distribution to use for the build.
# Examples: 'fedora', 'ubuntu', 'registry.access.redhat.com/ubi8/ubi-minimal'
#
variable "DISTRO_BASE" {
default = "ubuntu"
}
# A short string to identify the base distribution
# in conditional code in the Dockerfile.
# Examples: 'fedora', 'ubuntu', 'ubi'
variable "DISTRO_BASE_SHORT" {
default = "ubuntu"
}
# The version tag of the DISTRO_BASE to use.
# Examples: '22.04' (for ubuntu), '38' (for fedora) '8.8' (for ubi).
variable "DISTRO_VERSION" {
default = "22.04"
}
# The CMAKE_INSTALL_PREFIX for the libraries being built.
variable "PREFIX" {
default = "/opt/deephaven"
}
target "protoc-base" {
context = "proto/"
contexts = {
cpp-client-base = "target:cpp-client-base"
}
tags = [ "${REPO_PREFIX}protoc-base:${TAG}" ]
target = "protoc-base"
}
target "cpp-client-base" {
context = "cpp-client/"
tags = [ "${REPO_PREFIX}cpp-client-base:${TAG}" ]
args = {
"BUILD_TYPE" = "${BUILD_TYPE}"
"DISTRO_BASE" = "${DISTRO_BASE}"
"DISTRO_BASE_SHORT" = "${DISTRO_BASE_SHORT}"
"DISTRO_VERSION" = "${DISTRO_VERSION}"
"PREFIX" = "${PREFIX}"
}
}
target "cpp-clients-multi-base" {
context = "cpp-clients-multi/"
contexts = {
cpp-client-base = "target:cpp-client-base"
}
tags = [ "${REPO_PREFIX}cpp-clients-multi-base:${TAG}" ]
args = {
"DISTRO_BASE_SHORT" = "${DISTRO_BASE_SHORT}"
"PREFIX" = "${PREFIX}"
}
}
target "protoc-base-release" {
inherits = [ "protoc-base" ]
cache-from = [ "type=gha,scope=${CACHE_PREFIX}protoc-base" ]
cache-to = [ "type=gha,mode=max,scope=${CACHE_PREFIX}protoc-base" ]
platforms = [ "linux/amd64" ]
}
target "cpp-client-base-release" {
inherits = [ "cpp-client-base" ]
cache-from = [ "type=gha,scope=${CACHE_PREFIX}cpp-client-base" ]
cache-to = [ "type=gha,mode=max,scope=${CACHE_PREFIX}cpp-client-base" ]
platforms = [ "linux/amd64" ]
}
target "cpp-clients-multi-base-release" {
inherits = [ "cpp-clients-multi-base" ]
cache-from = [ "type=gha,scope=${CACHE_PREFIX}cpp-clients-multi-base" ]
cache-to = [ "type=gha,mode=max,scope=${CACHE_PREFIX}cpp-clients-multi-base" ]
platforms = [ "linux/amd64" ]
}