Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4560628

Browse files
committed
Implementing multi-arch build
1 parent 511d059 commit 4560628

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

‎hooks/build‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
echo "Starting multi-arch build process ..."
4+
docker buildx build \
5+
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x \
6+
--pull \
7+
--progress plain \
8+
--tag $IMAGE_NAME \
9+
--file $DOCKERFILE_PATH \
10+
--push \
11+
.

‎hooks/pre_build‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
echo "Installing QEMU emulators on docker-hub build node for multi-arch build process"
4+
docker run --privileged --rm tonistiigi/binfmt --install all
5+
6+
echo "Creating multi-arch builder ahead of build process..."
7+
docker buildx create \
8+
--name multiarch \
9+
--driver docker-container \
10+
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x \
11+
--bootstrap \
12+
--use
13+

‎hooks/push‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
echo "The docker multi-arch $IMAGE_NAME was pushed during the buildx build process ..."
4+
echo "Build process completed!"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /