File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This is a script to push with multiple platform images to docker hub
4
+
5
+ # login to docker hub
6
+ BM_USER=" ghkdqhrbals"
7
+ BM_PLATFORM=" linux/amd64,linux/arm64"
8
+ BM_VERSION=" latest"
9
+
10
+ docker buildx create --use
11
+
12
+ docker buildx inspect --bootstrap
13
+
14
+ echo " Build the docker image with multi platform support"
15
+ docker buildx build --platform ${BM_PLATFORM} -t ${BM_USER} /bm-controller:${BM_VERSION} -f /bm-controller/Dockerfile --push .
16
+ docker buildx build --platform ${BM_PLATFORM} -t ${BM_USER} /bm-agent:${BM_VERSION} -f /bm-agent/Dockerfile --push .
17
+
18
+ # Build the docker image
19
+ images=$( docker images --format " {{.Repository}}" | grep " ^${PREFIX} " )
20
+
21
+ # Push the docker image to docker hub
22
+ echo " Image deploy to docker hub"
23
+ for image in $images ; do
24
+ echo " ${image} "
25
+ docker push " ${image} "
26
+ done
You can’t perform that action at this time.
0 commit comments