Dockerhub Multiarch Build #80
3 changed files with 19 additions and 0 deletions
10
hooks/build
Normal file
10
hooks/build
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Custom build script to build images for all supported architectures.
|
||||||
|
# Example for IMAGE_NAME: ckulka/baikal:apache
|
||||||
|
|
||||||
|
for arch in amd64 arm32v5 arm32v7 arm64v8
|
||||||
|
do
|
||||||
|
echo "Building $IMAGE_NAME-$arch"
|
||||||
|
docker build --build-arg FROM_ARCH=$arch --file $DOCKERFILE_PATH --tag $IMAGE_NAME-$arch .
|
||||||
|
done
|
||||||
9
hooks/push
Normal file
9
hooks/push
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Custom build script to push images for all supported architectures.
|
||||||
|
|
||||||
|
for arch in amd64 arm32v5 arm32v7 arm64v8
|
||||||
|
do
|
||||||
|
echo "Pushing $IMAGE_NAME-$arch"
|
||||||
|
docker push $IMAGE_NAME-$arch
|
||||||
|
done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue