forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
130 lines (114 loc) · 2.95 KB
/
docker-bake.hcl
File metadata and controls
130 lines (114 loc) · 2.95 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
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
// Docker Bake configuration for reth and op-reth images
// Usage:
// docker buildx bake ethereum # Build reth
// docker buildx bake optimism # Build op-reth
// docker buildx bake # Build all
variable "REGISTRY" {
default = "ghcr.io/paradigmxyz"
}
variable "TAG" {
default = "latest"
}
variable "BUILD_PROFILE" {
default = "maxperf"
}
variable "FEATURES" {
default = "jemalloc asm-keccak min-debug-logs"
}
// Git info for vergen (since .git is excluded from Docker context)
variable "VERGEN_GIT_SHA" {
default = ""
}
variable "VERGEN_GIT_DESCRIBE" {
default = ""
}
variable "VERGEN_GIT_DIRTY" {
default = "false"
}
// Common settings for all targets
group "default" {
targets = ["ethereum", "optimism"]
}
group "nightly" {
targets = ["ethereum", "ethereum-profiling", "ethereum-edge-profiling", "optimism", "optimism-profiling"]
}
// Base target with shared configuration
target "_base" {
dockerfile = "Dockerfile.depot"
platforms = ["linux/amd64", "linux/arm64"]
args = {
BUILD_PROFILE = "${BUILD_PROFILE}"
FEATURES = "${FEATURES}"
VERGEN_GIT_SHA = "${VERGEN_GIT_SHA}"
VERGEN_GIT_DESCRIBE = "${VERGEN_GIT_DESCRIBE}"
VERGEN_GIT_DIRTY = "${VERGEN_GIT_DIRTY}"
}
secret = [
{
type = "env"
id = "DEPOT_TOKEN"
}
]
}
target "_base_profiling" {
inherits = ["_base"]
platforms = ["linux/amd64"]
}
// Ethereum (reth)
target "ethereum" {
inherits = ["_base"]
args = {
BINARY = "reth"
MANIFEST_PATH = "bin/reth"
}
tags = ["${REGISTRY}/reth:${TAG}"]
}
target "ethereum-profiling" {
inherits = ["_base_profiling"]
args = {
BINARY = "reth"
MANIFEST_PATH = "bin/reth"
BUILD_PROFILE = "profiling"
FEATURES = "jemalloc jemalloc-prof asm-keccak min-debug-logs"
}
tags = ["${REGISTRY}/reth:nightly-profiling"]
}
target "ethereum-edge-profiling" {
inherits = ["_base_profiling"]
args = {
BINARY = "reth"
MANIFEST_PATH = "bin/reth"
BUILD_PROFILE = "profiling"
FEATURES = "jemalloc jemalloc-prof asm-keccak min-debug-logs edge"
}
tags = ["${REGISTRY}/reth:nightly-edge-profiling"]
}
// Optimism (op-reth)
target "optimism" {
inherits = ["_base"]
args = {
BINARY = "op-reth"
MANIFEST_PATH = "crates/optimism/bin"
}
tags = ["${REGISTRY}/op-reth:${TAG}"]
}
target "optimism-profiling" {
inherits = ["_base_profiling"]
args = {
BINARY = "op-reth"
MANIFEST_PATH = "crates/optimism/bin"
BUILD_PROFILE = "profiling"
FEATURES = "jemalloc jemalloc-prof asm-keccak min-debug-logs"
}
tags = ["${REGISTRY}/op-reth:nightly-profiling"]
}
target "optimism-edge-profiling" {
inherits = ["_base_profiling"]
args = {
BINARY = "op-reth"
MANIFEST_PATH = "crates/optimism/bin"
BUILD_PROFILE = "profiling"
FEATURES = "jemalloc jemalloc-prof asm-keccak min-debug-logs edge"
}
tags = ["${REGISTRY}/op-reth:nightly-edge-profiling"]
}