2020-03-29 01:42:21 +01:00
|
|
|
#!/usr/bin/with-contenv bash
|
|
|
|
set -e
|
|
|
|
|
2020-03-29 01:46:30 +01:00
|
|
|
# Designed to replace original, overcomplicated entrypoint script from official wordpress docker repository
|
|
|
|
# Why not use already available tools instead?!
|
|
|
|
|
2020-03-29 01:42:21 +01:00
|
|
|
function wp() {
|
|
|
|
# Running as root in container is OK as long as all security implications are observed and maintained
|
|
|
|
/usr/local/bin/wp --allow-root "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "> Verifying 'Wordpress ${WP_VERSION}' installation..."
|
|
|
|
if wp core version;
|
|
|
|
then
|
|
|
|
echo "> Found 'Wordpress ${WP_VERSION}'"
|
|
|
|
else
|
|
|
|
echo "> Downloading 'Wordpress ${WP_VERSION}'..."
|
|
|
|
wp core download --locale="${WP_LOCALE}" --version="${WP_VERSION}"
|
|
|
|
fi
|