diff --git a/README.md b/README.md index 0257402..ffb0e3c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Only build for arm right now, based on debian:bookworm-slim images and some code of php:8.2-apache, version 7.4 and 8.2 +amd64 and arm64/v8, based on debian:bookworm-slim images and some code of php:8.2-apache, version 7.4 and 8.2 ```bash docker run -d --name container_name \ diff --git a/build.sh b/build.sh index 97c3e96..60e0ccf 100755 --- a/build.sh +++ b/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