mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2025-12-11 07:22:40 +01:00
23 lines
762 B
Bash
Executable File
23 lines
762 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
WP_VERSIONS=${1:-""}
|
|
WP_LATEST_VERSION=${2:-""}
|
|
|
|
if [ -z "${WP_VERSIONS}" ]; then
|
|
echo "Error: WP_VERSIONS is null"
|
|
exit 1
|
|
fi
|
|
|
|
docker buildx create --use --name build --node build --driver-opt network=host
|
|
|
|
# Loop through requested versions
|
|
for TARGET_VERSION in ${WP_VERSIONS}; do
|
|
echo "> Building WordPress ${TARGET_VERSION}"
|
|
|
|
docker buildx build --pull --push --build-arg "WP_VERSION=${TARGET_VERSION}" --platform "linux/amd64,linux/armhf,linux/aarch64" --tag "nlss/wordpress:${TARGET_VERSION}" .
|
|
|
|
if [ "${TARGET_VERSION}" == "${WP_LATEST_VERSION}"]; then
|
|
docker buildx build --pull --push --build-arg "WP_VERSION=${TARGET_VERSION}" --platform "linux/amd64,linux/armhf,linux/aarch64" --tag "nlss/wordpress:latest" .
|
|
fi
|
|
done
|