From 309e559f811c66f0bbef922e62c2bd974eeb824a Mon Sep 17 00:00:00 2001 From: xZero707 Date: Thu, 2 Apr 2020 01:34:34 +0200 Subject: [PATCH] Add passthrough 'wp' script that adds --allow-root and --path arguments to wp-cli --- Dockerfile | 2 +- rootfs/usr/local/bin/wp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 rootfs/usr/local/bin/wp diff --git a/Dockerfile b/Dockerfile index df5a78b..b14baf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ RUN apk add --update --no-cache ${APK_WP_CLI_DEPS} ${APK_DEPS} ${APK_BUILD_DEPS} ADD rootfs / COPY ["wp-config.php", "/var/www/html"] COPY --from=wordpress-builder /tmp/build/rootfs / -COPY --from=wordpress:cli-php7.4 /usr/local/bin/wp /usr/local/bin/ +COPY --from=wordpress:cli-php7.4 /usr/local/bin/wp /usr/local/bin/wp-cli ENV WP_CONTENT_ID 2bca7d694c6279bb79bbb642ba4305f9 ENV WP_VERSION 5.3.2 diff --git a/rootfs/usr/local/bin/wp b/rootfs/usr/local/bin/wp new file mode 100644 index 0000000..38567e1 --- /dev/null +++ b/rootfs/usr/local/bin/wp @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +/usr/local/bin/wp-cli --allow-root --path="/var/www/${WEB_ROOT}" "$@"