-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
92 lines (71 loc) · 3.98 KB
/
Makefile
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
UBUNTU?=22.04
OPENSDK_UBUNTU?=20.04
DEBIAN?=bookworm
DOCKER_USER?=wpilib
.PHONY: usage update update/arm push build \
$(patsubst %,build/%, arm-base base cross minimal-base minimal-cross opensdk)
$(patsubst %,push/%, arm-base base cross minimal-base minimal-cross opensdk)
usage:
@echo "Run make update, make build, and make push"
update:
docker pull docker.io/ubuntu:${UBUNTU}
docker pull docker.io/ubuntu:${OPENSDK_UBUNTU}
update/arm:
docker pull docker.io/debian:${DEBIAN}
build: build/base build/cross build/opensdk
build/arm-base:
cd debian-base && \
docker build -t ${DOCKER_USER}/debian-base:arm64-${DEBIAN} -f Dockerfile.${DEBIAN} .
build/base:
cd ubuntu-base && \
docker build -t ${DOCKER_USER}/ubuntu-base:${UBUNTU} -f Dockerfile.${UBUNTU} .
build/cross: build/base
cd roborio-cross-ubuntu && \
docker build -t ${DOCKER_USER}/roborio-cross-ubuntu:2025-${UBUNTU} -f Dockerfile.2025 --build-arg UBUNTU=${UBUNTU} --build-arg TYPE=base .
cd systemcore-cross-ubuntu && \
docker build -t ${DOCKER_USER}/systemcore-cross-ubuntu:2025-${UBUNTU} -f Dockerfile.2025 --build-arg UBUNTU=${UBUNTU} --build-arg TYPE=base .
cd raspbian-cross-ubuntu && \
docker build -t ${DOCKER_USER}/raspbian-cross-ubuntu:bookworm-${UBUNTU} -f Dockerfile.bookworm --build-arg UBUNTU=${UBUNTU} --build-arg TYPE=base .
cd aarch64-cross-ubuntu && \
docker build -t ${DOCKER_USER}/aarch64-cross-ubuntu:bookworm-${UBUNTU} -f Dockerfile.bookworm --build-arg UBUNTU=${UBUNTU} --build-arg TYPE=base .
build/minimal-base:
cd ubuntu-minimal-base && \
docker build -t ${DOCKER_USER}/ubuntu-minimal-base:${UBUNTU} -f Dockerfile.${UBUNTU} .
build/minimal-cross: build/minimal-base
cd roborio-cross-ubuntu && \
docker build -t ${DOCKER_USER}/roborio-cross-ubuntu-minimal:2025-${UBUNTU} -f Dockerfile.2025 --build-arg UBUNTU=${UBUNTU} --build-arg TYPE=minimal-base .
cd systemcore-cross-ubuntu && \
docker build -t ${DOCKER_USER}/systemcore-cross-ubuntu-minimal:2025-${UBUNTU} -f Dockerfile.2025 --build-arg UBUNTU=${UBUNTU} --build-arg TYPE=minimal-base .
cd raspbian-cross-ubuntu && \
docker build -t ${DOCKER_USER}/raspbian-cross-ubuntu-minimal:bookworm-${UBUNTU} -f Dockerfile.bookworm --build-arg UBUNTU=${UBUNTU} --build-arg TYPE=minimal-base .
cd aarch64-cross-ubuntu && \
docker build -t ${DOCKER_USER}/aarch64-cross-ubuntu-minimal:bookworm-${UBUNTU} -f Dockerfile.bookworm --build-arg UBUNTU=${UBUNTU} --build-arg TYPE=minimal-base .
build/opensdk:
cd opensdk/ubuntu && \
docker build -t ${DOCKER_USER}/opensdk-ubuntu:${OPENSDK_UBUNTU} --build-arg OPENSDK_UBUNTU=${OPENSDK_UBUNTU} .
push: $(patsubst %,push/%, base cross opensdk)
push/arm-base:
docker push ${DOCKER_USER}/debian-base:arm64-${DEBIAN}
push/base:
docker push ${DOCKER_USER}/ubuntu-base:${UBUNTU}
push/cross: push/base
docker push ${DOCKER_USER}/roborio-cross-ubuntu:2025-${UBUNTU}
docker push ${DOCKER_USER}/systemcore-cross-ubuntu:2025-${UBUNTU}
docker push ${DOCKER_USER}/raspbian-cross-ubuntu:bookworm-${UBUNTU}
docker push ${DOCKER_USER}/aarch64-cross-ubuntu:bookworm-${UBUNTU}
push/minimal-base:
docker push ${DOCKER_USER}/ubuntu-minimal-base:${UBUNTU}
push/minimal-cross: push/minimal-base
docker push ${DOCKER_USER}/roborio-cross-ubuntu-minimal:2025-${UBUNTU}
docker push ${DOCKER_USER}/systemcore-cross-ubuntu-minimal:2025-${UBUNTU}
docker push ${DOCKER_USER}/raspbian-cross-ubuntu-minimal:bookworm-${UBUNTU}
docker push ${DOCKER_USER}/aarch64-cross-ubuntu-minimal:bookworm-${UBUNTU}
push/opensdk:
docker push ${DOCKER_USER}/opensdk-ubuntu:${OPENSDK_UBUNTU}
.PHONY: save/minimal-cross
save/minimal-cross:
docker save ${DOCKER_USER}/roborio-cross-ubuntu-minimal:2025-${UBUNTU} | gzip > roborio.tar.gz
docker save ${DOCKER_USER}/systemcore-cross-ubuntu-minimal:2025-${UBUNTU} | gzip > systemcore.tar.gz
docker save ${DOCKER_USER}/raspbian-cross-ubuntu-minimal:bookworm-${UBUNTU} | gzip > raspbian.tar.gz
docker save ${DOCKER_USER}/aarch64-cross-ubuntu-minimal:bookworm-${UBUNTU} | gzip > aarch64.tar.gz
include cross-ubuntu-py/py.mk