wordpress/rootfs/usr/local/bin/container-setup
Knut Ahlers c785e00733
Fix: Add json module
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-12-23 01:14:29 +01:00

29 lines
500 B
Bash
Executable file

#!/bin/bash
set -euxo pipefail
url="https://github.com/WordPress/WordPress/archive/${WP_VERSION}.tar.gz"
packages=(
php7-curl
php7-gd
php7-json
php7-mysqli
php7-opcache
php7-zip
)
function cleanup() {
rm -rf \
/tmp/wp.tgz
}
trap cleanup EXIT
function step() {
echo "$@..." >&2
}
step "Downloading wordpress release ${WP_VERSION}"
curl -sSfLo /opt/wp.tgz "${url}"
echo "${WP_CHECKSUM} /opt/wp.tgz" | sha256sum -c
step "Installing required packages"
apk --no-cache add "${packages[@]}"