Skip to content

Commit a7ee26e

Browse files
committed
Implementing multi-arch build
1 parent b9e4325 commit a7ee26e

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
echo "Creating multi-arch builder ahead of build process..."
4+
docker buildx create \
5+
--name multiarch \
6+
--driver docker-container \
7+
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x \
8+
--bootstrap \
9+
--use
10+

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)