-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
181 lines (136 loc) · 8.8 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
.PHONY: help clean generate build_focal build_dev build_bionic build
ARCH := $(shell uname -m)
help:
@echo 'usage: make [target]'
@echo
@echo 'Help:'
@echo ' help This message'
@echo
@echo 'Generate:'
@echo ' generate Generate all dockerfiles'
@echo
@echo 'Build:'
@echo ' build Build all docker images'
@echo ' build_focal Build all focal based images'
@echo ' build_bionic Build all bionic based images'
@echo ' build_focal_[version] Build specific version of python against ubutnu 20.04'
@echo ' build_bionic_[version] Build specific version of python against ubuntu 18.04'
@echo
@echo 'Upload:'
@echo ' push Push all docker images up to dockerhub.'
clean:
rm -rf out
generate:
@python generate.py
@echo 'All Dockerfiles Generated!'
# Build
build_jammy_%:
@echo 'Building $* on Ubuntu 22.04'
docker build --rm -f "out/$*/jammy/Dockerfile" -t pybuntu:$*-22.04-$(ARCH) -t jetblackpope/pybuntu:$*-jammy-$(ARCH) out/$*/jammy
build_focal_%:
@echo 'Building $* on Ubuntu 20.04 for $(ARCH)'
@docker build --rm -f "out/$*/focal/Dockerfile" -t pybuntu:$*-20.04-$(ARCH) -t jetblackpope/pybuntu:$*-focal-$(ARCH) out/$*/focal
build_bionic_%:
@echo 'Building $* on Ubuntu 18.04'
docker build --rm -f "out/$*/bionic/Dockerfile" -t pybuntu:$*-18.04-$(ARCH) -t jetblackpope/pybuntu:$*-bionic-$(ARCH) out/$*/bionic
build_jammy: build_jammy_3.7.17 build_jammy_3.8.18 build_jammy_3.9.18 build_jammy_3.10.12 build_jammy_3.11.5 #build_jammy_3.12.0rc2
@echo 'All jammy based images built!'
build_focal: build_focal_3.7.17 build_focal_3.8.18 build_focal_3.9.18 build_focal_3.10.12 build_focal_3.11.5 #build_focal_3.12.0rc2
@echo 'All focal based images built!'
build_bionic: build_bionic_3.7.17 build_bionic_3.8.18 build_bionic_3.9.18 build_bionic_3.10.12 build_bionic_3.11.5 #build_bionic_3.12.0rc2
@echo 'All bionic images built'
build: build_bionic build_focal build_jammy
@echo 'All images built!'
# Push
push_jammy:
@echo 'Pushing jammy images'
# @docker push jetblackpope/pybuntu:3.12.0rc2-jammy-$(ARCH)
@docker push jetblackpope/pybuntu:3.11.5-jammy-$(ARCH)
@docker push jetblackpope/pybuntu:3.10.12-jammy-$(ARCH)
@docker push jetblackpope/pybuntu:3.9.18-jammy-$(ARCH)
@docker push jetblackpope/pybuntu:3.8.18-jammy-$(ARCH)
@docker push jetblackpope/pybuntu:3.7.17-jammy-$(ARCH)
push_focal:
@echo 'Pushing focal images'
# @docker push jetblackpope/pybuntu:3.12.0rc2-focal-$(ARCH)
@docker push jetblackpope/pybuntu:3.11.5-focal-$(ARCH)
@docker push jetblackpope/pybuntu:3.10.12-focal-$(ARCH)
@docker push jetblackpope/pybuntu:3.9.18-focal-$(ARCH)
@docker push jetblackpope/pybuntu:3.8.18-focal-$(ARCH)
@docker push jetblackpope/pybuntu:3.7.17-focal-$(ARCH)
push_bionic:
@echo 'Pushing bionic images'
# @docker push jetblackpope/pybuntu:3.12.0rc2-bionic-$(ARCH)
@docker push jetblackpope/pybuntu:3.11.5-bionic-$(ARCH)
@docker push jetblackpope/pybuntu:3.10.12-bionic-$(ARCH)
@docker push jetblackpope/pybuntu:3.9.18-bionic-$(ARCH)
@docker push jetblackpope/pybuntu:3.8.18-bionic-$(ARCH)
@docker push jetblackpope/pybuntu:3.7.17-bionic-$(ARCH)
push: push_focal push_bionic push_jammy
@echo 'Pushing images up to dockerhub'
# Manifest
manifest_jammy_%:
@echo 'Creating multi arch manifest for $*'
@docker manifest create jetblackpope/pybuntu:$*-jammy --amend jetblackpope/pybuntu:$*-jammy-arm64 --amend jetblackpope/pybuntu:$*-jammy-x86_64
manifest_jammy: manifest_jammy_3.7.17 manifest_jammy_3.8.18 manifest_jammy_3.9.18 manifest_jammy_3.10.12 manifest_jammy_3.11.5 #manifest_jammy_3.12.0rc2
@echo 'Creating multi arch image for jammy'
manifest_bionic_%:
@echo 'Creating multi arch manifest for $*'
@docker manifest create jetblackpope/pybuntu:$*-bionic --amend jetblackpope/pybuntu:$*-bionic-arm64 --amend jetblackpope/pybuntu:$*-bionic-x86_64
manifest_bionic: manifest_bionic_3.7.17 manifest_bionic_3.8.18 manifest_bionic_3.9.18 manifest_bionic_3.10.12 manifest_bionic_3.11.5 #manifest_bionic_3.12.0rc2
@echo 'Creating multi arch image for bionic'
manifest_focal_%:
@echo 'Creating multi arch manifest for $*'
@docker manifest create jetblackpope/pybuntu:$*-focal --amend jetblackpope/pybuntu:$*-focal-arm64 --amend jetblackpope/pybuntu:$*-focal-x86_64
manifest_focal: manifest_focal_3.7.17 manifest_focal_3.8.18 manifest_focal_3.9.18 manifest_focal_3.10.12 manifest_focal_3.11.5 #manifest_focal_3.12.0rc2
@echo 'Creating multi arch manifest for focal'
manifest: manifest_focal manifest_bionic manifest_jammy
@echo 'Creating all multiarch manifests'
push_manifest_jammy_%:
@echo 'Pushing multi-arch image'
@docker manifest push jetblackpope/pybuntu:$*-jammy
push_manifest_jammy: push_manifest_jammy_3.7.17 push_manifest_jammy_3.8.18 push_manifest_jammy_3.9.18 push_manifest_jammy_3.10.12 push_manifest_jammy_3.11.5 #push_manifest_jammy_3.12.0rc2
@echo 'Pushing all multi-arch jammy images'
push_manifest_bionic_%:
@echo 'Pushing multi-arch image'
@docker manifest push jetblackpope/pybuntu:$*-bionic
push_manifest_bionic: push_manifest_bionic_3.7.17 push_manifest_bionic_3.8.18 push_manifest_bionic_3.9.18 push_manifest_bionic_3.10.12 push_manifest_bionic_3.11.5 #push_manifest_bionic_3.12.0rc2
@echo 'Pushing all multi-arch bionic images'
push_manifest_focal_%:
@echo 'Pushing multi-arch image'
@docker manifest push jetblackpope/pybuntu:$*-focal
push_manifest_focal: push_manifest_focal_3.7.17 push_manifest_focal_3.8.18 push_manifest_focal_3.9.18 push_manifest_focal_3.10.12 push_manifest_focal_3.11.5 #push_manifest_focal_3.12.0rc2
@echo 'Pushing all multi-arch focal images'
push_manifest: push_manifest_bionic push_manifest_focal push_jammy
@echo 'Pushing all manifest files to dockerhub'
@docker manifest create jetblackpope/pybuntu:latest --amend jetblackpope/pybuntu:3.11.5-jammy-arm64 --amend jetblackpope/pybuntu:3.11.5-jammy-x86_64
@docker manifest create jetblackpope/pybuntu:3.11-jammy --amend jetblackpope/pybuntu:3.11.5-jammy-arm64 --amend jetblackpope/pybuntu:3.11.5-jammy-x86_64
@docker manifest push jetblackpope/pybuntu:3.11-jammy
@docker manifest create jetblackpope/pybuntu:3.10-jammy --amend jetblackpope/pybuntu:3.10.12-jammy-arm64 --amend jetblackpope/pybuntu:3.10.12-jammy-x86_64
@docker manifest push jetblackpope/pybuntu:3.10-jammy
@docker manifest create jetblackpope/pybuntu:3.9-jammy --amend jetblackpope/pybuntu:3.9.18-jammy-arm64 --amend jetblackpope/pybuntu:3.9.18-jammy-x86_64
@docker manifest push jetblackpope/pybuntu:3.9-jammy
@docker manifest create jetblackpope/pybuntu:3.8-jammy --amend jetblackpope/pybuntu:3.8.18-jammy-arm64 --amend jetblackpope/pybuntu:3.8.18-jammy-x86_64
@docker manifest push jetblackpope/pybuntu:3.8-jammy
@docker manifest create jetblackpope/pybuntu:3.7-jammy --amend jetblackpope/pybuntu:3.7.17-jammy-arm64 --amend jetblackpope/pybuntu:3.7.17-jammy-x86_64
@docker manifest push jetblackpope/pybuntu:3.7-jammy
@docker manifest create jetblackpope/pybuntu:3.11-focal --amend jetblackpope/pybuntu:3.11.5-focal-arm64 --amend jetblackpope/pybuntu:3.11.5-focal-x86_64
@docker manifest push jetblackpope/pybuntu:3.11-focal
@docker manifest create jetblackpope/pybuntu:3.10-focal --amend jetblackpope/pybuntu:3.10.12-focal-arm64 --amend jetblackpope/pybuntu:3.10.12-focal-x86_64
@docker manifest push jetblackpope/pybuntu:3.10-focal
@docker manifest create jetblackpope/pybuntu:3.9-focal --amend jetblackpope/pybuntu:3.9.18-focal-arm64 --amend jetblackpope/pybuntu:3.9.18-focal-x86_64
@docker manifest push jetblackpope/pybuntu:3.9-focal
@docker manifest create jetblackpope/pybuntu:3.8-focal --amend jetblackpope/pybuntu:3.8.18-focal-arm64 --amend jetblackpope/pybuntu:3.8.18-focal-x86_64
@docker manifest push jetblackpope/pybuntu:3.8-focal
@docker manifest create jetblackpope/pybuntu:3.7-focal --amend jetblackpope/pybuntu:3.7.17-focal-arm64 --amend jetblackpope/pybuntu:3.7.17-focal-x86_64
@docker manifest push jetblackpope/pybuntu:3.7-focal
@docker manifest create jetblackpope/pybuntu:3.11-bionic --amend jetblackpope/pybuntu:3.11.5-bionic-arm64 --amend jetblackpope/pybuntu:3.11.5-bionic-x86_64
@docker manifest push jetblackpope/pybuntu:3.11-bionic
@docker manifest create jetblackpope/pybuntu:3.10-bionic --amend jetblackpope/pybuntu:3.10.12-bionic-arm64 --amend jetblackpope/pybuntu:3.10.12-bionic-x86_64
@docker manifest push jetblackpope/pybuntu:3.10-bionic
@docker manifest create jetblackpope/pybuntu:3.9-bionic --amend jetblackpope/pybuntu:3.9.18-bionic-arm64 --amend jetblackpope/pybuntu:3.9.18-bionic-x86_64
@docker manifest push jetblackpope/pybuntu:3.9-bionic
@docker manifest create jetblackpope/pybuntu:3.8-bionic --amend jetblackpope/pybuntu:3.8.18-bionic-arm64 --amend jetblackpope/pybuntu:3.8.18-bionic-x86_64
@docker manifest push jetblackpope/pybuntu:3.8-bionic
@docker manifest create jetblackpope/pybuntu:3.7-bionic --amend jetblackpope/pybuntu:3.7.17-bionic-arm64 --amend jetblackpope/pybuntu:3.7.17-bionic-x86_64
@docker manifest push jetblackpope/pybuntu:3.7-bionic