This repository was archived by the owner on Jan 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
98 lines (83 loc) · 3.04 KB
/
docker-bake.hcl
File metadata and controls
98 lines (83 loc) · 3.04 KB
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
# Build multiplatform images for the service of the compose project.
#
# > docker buildx bake --push
#
# Images are tagged ghcr.io/kadena-io/evm-devnet-<SERVICE_NAME>. The respective
# packages are publicly available and associciated with this repository.
#
# (see note below on building chainweb-node images)
#
# Multiplatfrom builds fails for chainweb-node (because the installation of GHC
# with ghcup fails).
# ############################################################################ #
# Variables
local_arch = split("/",BAKE_LOCAL_PLATFORM)[1]
variable "VERSION" {
default = "latest"
}
variable "RETH_TAG" {
default = "ghcr.io/kadena-io/evm-devnet-kadena-reth:${VERSION}"
}
variable "ALLOCATIONS_TAG" {
default = "ghcr.io/kadena-io/evm-devnet-allocations:${VERSION}"
}
variable "CHAINWEB_NODE_TAG" {
default = "ghcr.io/kadena-io/evm-devnet-chainweb-node:${VERSION}"
}
variable "SUPPORTED_PLATFORMS" {
default = ["linux/arm64", "linux/amd64"]
}
# By default we build only for the local platform
variable "PLATFORMS" {
default = [ "linux/${local_arch}" ]
validation {
condition = setintersection(PLATFORMS, SUPPORTED_PLATFORMS) == convert(PLATFORMS,set(string))
error_message = "PLATFORMS can include only ${jsonencode(SUPPORTED_PLATFORMS)} but is ${jsonencode(PLATFORMS)}"
}
}
# ############################################################################ #
# Groups
group "default" {
targets = ["kadena-reth", "allocations", "chainweb-node"]
}
# ############################################################################ #
# Targets
target "kadena-reth" {
context = "https://github.com/kadena-io/kadena-reth.git"
tags = [ RETH_TAG ]
platforms = PLATFORMS
annotations = [
"manifest:org.opencontainers.image.description=Reth with precompiles for the Kadena EVM devnet",
"manifest:org.opencontainers.image.source=https://github.com/kadena-io/kadena-evm-sandbox"
]
}
target "allocations" {
context = "./allocations"
dockerfile = "Dockerfile"
tags = [ ALLOCATIONS_TAG ]
platforms = PLATFORMS
annotations = [
"manifest:org.opencontainers.image.description=Allocations for the Kadena EVM devnet",
"manifest:org.opencontainers.image.source=https://github.com/kadena-io/kadena-evm-sandbox"
]
}
# Installing ghc with ghcup for a non-native platform is very slow and often
# fails. I therefor build and push only the linux/arm64 version and add the
# linux/amd64 version manually from the CI build in the chainweb repository.
#
# > docker buildx bake --push
# > docker buildx imagetools create --append ghcr.io/kadena-io/chainweb-node:lars-pp-evm --tag ghcr.io/kadena-io/evm-devnet-chainweb-node:latest
#
target "chainweb-node" {
context = "https://github.com/kadena-io/chainweb-node.git#lars/pp/evm"
tags = [ CHAINWEB_NODE_TAG ]
target = "chainweb-node"
platforms = PLATFORMS
annotations = [
"manifest:org.opencontainers.image.description=Chainweb node for the Kadena EVM devnet",
"manifest:org.opencontainers.image.source=https://github.com/kadena-io/kadena-evm-sandbox"
]
args = {
UNFREEZE = "true"
}
}