-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-all.sh
More file actions
executable file
·85 lines (71 loc) · 2.16 KB
/
Copy pathbuild-all.sh
File metadata and controls
executable file
·85 lines (71 loc) · 2.16 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
#!/bin/bash
# Build all embedded development containers
# Usage: ./build-all.sh [--push] [--registry git.bezg.in]
set -e
REGISTRY=""
PUSH=false
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
--push)
PUSH=true
shift
;;
--registry)
REGISTRY="$2/"
shift 2
;;
*)
echo "Unknown option: $1"
echo "Usage: $0 [--push] [--registry git.bezg.in]"
exit 1
;;
esac
done
echo "========================================"
echo "Building Embedded Development Containers"
echo "========================================"
# Color output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
build_container() {
local name=$1
local dir=$2
echo -e "${BLUE}Building ${name}...${NC}"
docker build -t "${REGISTRY}embedded/${name}:latest" "${dir}"
echo -e "${GREEN}✓ ${name} built successfully${NC}"
echo ""
if [ "$PUSH" = true ]; then
echo -e "${BLUE}Pushing ${name} to registry...${NC}"
docker push "${REGISTRY}embedded/${name}:latest"
echo -e "${GREEN}✓ ${name} pushed successfully${NC}"
echo ""
fi
}
# Build individual containers
build_container "arm-cortex-m" "arm-cortex-m"
build_container "esp32" "esp32"
build_container "riscv" "riscv"
build_container "renesas-ra" "renesas-ra"
build_container "platformio" "platformio"
# Build complete container (combines all)
echo -e "${BLUE}Building complete container...${NC}"
docker build -t "${REGISTRY}embedded/complete:latest" "complete"
echo -e "${GREEN}✓ Complete container built successfully${NC}"
if [ "$PUSH" = true ]; then
echo -e "${BLUE}Pushing complete container...${NC}"
docker push "${REGISTRY}embedded/complete:latest"
echo -e "${GREEN}✓ Complete container pushed successfully${NC}"
fi
echo ""
echo "========================================"
echo -e "${GREEN}All containers built successfully!${NC}"
echo "========================================"
echo ""
echo "Available images:"
docker images | grep embedded
if [ "$PUSH" = true ]; then
echo ""
echo "Images pushed to: ${REGISTRY}embedded/"
fi