Skip to content

Commit 3d0c667

Browse files
TrafeXdavidwuest
andauthoredMar 23, 2025
Define WordPress path so that the WP CLI works from every location (#67)
--------- Co-authored-by: DavidWuest <d.wuest@cinevision-solutions.com>
1 parent 87d3d45 commit 3d0c667

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
 

‎Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ RUN curl -o wordpress.tar.gz -SL https://wordpress.org/wordpress-${WORDPRESS_VER
6767
&& chown -R nobody:nobody /usr/src/wordpress
6868

6969
# Add WP CLI
70+
ENV WP_CLI_CONFIG_PATH /usr/src/wordpress/wp-cli.yml
7071
RUN curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
7172
&& chmod +x /usr/local/bin/wp
73+
COPY --chown=nobody:nobody wp-cli.yml /usr/src/wordpress/
7274

7375
# WP config
7476
COPY --chown=nobody:nobody wp-config.php /usr/src/wordpress

‎wp-cli.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file is used by the wp-cli tool to define the path to the WordPress installation
2+
path: /usr/src/wordpress

0 commit comments

Comments
 (0)