-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-multiarch.sh
More file actions
executable file
·98 lines (80 loc) · 2.29 KB
/
Copy pathbuild-multiarch.sh
File metadata and controls
executable file
·98 lines (80 loc) · 2.29 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
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DOCKER_USER="${DOCKER_USER:-nessnetwork}"
BUILDER_NAME="${BUILDER_NAME:-ness-builder}"
# Tier definitions
TIER1_PLATFORMS="linux/amd64,linux/arm64,linux/arm/v7"
TIER1_IMAGES=(
"emercoin-core"
"skywire"
"dns-reverse-proxy"
"privateness"
"pyuheprng"
"privatenesstools"
)
TIER2_PLATFORMS="linux/amd64,linux/arm64"
TIER2_IMAGES=(
"yggdrasil"
"ipfs"
"i2p-yggdrasil"
)
TIER3_PLATFORMS="linux/amd64,linux/arm64"
TIER3_IMAGES=(
"privatenumer"
)
TIER4_PLATFORMS="linux/amd64,linux/arm64"
TIER4_IMAGES=(
"emercoin-mcp-server"
"privateness-mcp-server"
"emercoin-mcp-app"
"privateness-mcp-app"
"magic-wormhole-suite"
"inspector"
)
TIER5_PLATFORMS="linux/amd64"
TIER5_IMAGES=(
"htcondor-cm"
"htcondor-submit"
"htcondor-execute"
)
ensure_builder() {
if ! docker buildx inspect "$BUILDER_NAME" >/dev/null 2>&1; then
echo "Creating buildx builder '$BUILDER_NAME'..."
docker buildx create --name "$BUILDER_NAME" --driver docker-container --use >/dev/null
else
docker buildx use "$BUILDER_NAME" >/dev/null
fi
}
build_group() {
local platforms="$1"
shift
local images=("$@")
for image in "${images[@]}"; do
local context_path="${SCRIPT_DIR}/${image}"
if [[ ! -d "$context_path" ]]; then
echo "[ERROR] Missing build context for '$image' at $context_path" >&2
exit 1
fi
echo "\n>>> Building ${DOCKER_USER}/${image}:latest for ${platforms}"
docker buildx build \
--builder "$BUILDER_NAME" \
--progress=plain \
--platform "$platforms" \
-t "${DOCKER_USER}/${image}:latest" \
--push \
"$context_path"
done
}
ensure_builder
echo "Building Tier 1 (Pi3-safe) images..."
build_group "$TIER1_PLATFORMS" "${TIER1_IMAGES[@]}"
echo "Building Tier 2 (heavy / 64-bit) images..."
build_group "$TIER2_PLATFORMS" "${TIER2_IMAGES[@]}"
echo "Building Tier 3 (VOIP / WebRTC) images..."
build_group "$TIER3_PLATFORMS" "${TIER3_IMAGES[@]}"
echo "Building Tier 4 (MCP servers/apps + inspector) images..."
build_group "$TIER4_PLATFORMS" "${TIER4_IMAGES[@]}"
echo "Building Tier 5 (HTCondor pool images, amd64 only)..."
build_group "$TIER5_PLATFORMS" "${TIER5_IMAGES[@]}"
echo "\nAll multi-architecture images built and pushed successfully!"