Add passthrough 'wp' script that adds --allow-root and --path arguments to wp-cli

This commit is contained in:
xZero707 2020-04-02 01:34:34 +02:00
parent fe488e5752
commit 309e559f81
2 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,7 @@ RUN apk add --update --no-cache ${APK_WP_CLI_DEPS} ${APK_DEPS} ${APK_BUILD_DEPS}
ADD rootfs / ADD rootfs /
COPY ["wp-config.php", "/var/www/html"] COPY ["wp-config.php", "/var/www/html"]
COPY --from=wordpress-builder /tmp/build/rootfs / 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_CONTENT_ID 2bca7d694c6279bb79bbb642ba4305f9
ENV WP_VERSION 5.3.2 ENV WP_VERSION 5.3.2

3
rootfs/usr/local/bin/wp Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
/usr/local/bin/wp-cli --allow-root --path="/var/www/${WEB_ROOT}" "$@"