build multiarch images
This commit is contained in:
parent
f81f50ffe3
commit
b1a1c06d2b
2 changed files with 9 additions and 3 deletions
10
build.sh
10
build.sh
|
|
@ -9,17 +9,23 @@ function build() {
|
|||
PACKAGE="php:$1"
|
||||
PHP_VERSION="$2"
|
||||
echo "Building ${PACKAGE}"
|
||||
docker build \
|
||||
docker buildx build \
|
||||
--no-cache \
|
||||
--platform=linux/arm64/v8,linux/amd64 \
|
||||
--push \
|
||||
-f "${SCRIPT_DIR}/Dockerfile-php" \
|
||||
-t "git.paucapo.com/server/${PACKAGE}" \
|
||||
--build-arg PHP_VERSION=${PHP_VERSION} \
|
||||
$3 \
|
||||
"$SCRIPT_DIR"
|
||||
docker push "git.paucapo.com/server/${PACKAGE}"
|
||||
# docker push "git.paucapo.com/server/${PACKAGE}"
|
||||
}
|
||||
|
||||
docker login "http://git.paucapo.com/"
|
||||
|
||||
docker buildx create --use --platform=linux/arm64/v8,linux/amd64 --name multi-platform-builder
|
||||
docker buildx inspect --bootstrap
|
||||
|
||||
for PHP_VERSION in ${PHP_VERSIONS}; do
|
||||
build ${PHP_VERSION} ${PHP_VERSION}
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue