We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92bed8e commit 73648dcCopy full SHA for 73648dc
1 file changed
Dockerfile
@@ -44,5 +44,14 @@ RUN { \
44
echo 'max_execution_time = 300'; \
45
} > /usr/local/etc/php/conf.d/wordpress-recommended.ini
46
47
+# Install wp-cli for WordPress command line operations and create a wrapper script that includes --allow-root
48
+RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
49
+ chmod +x wp-cli.phar && \
50
+ mv wp-cli.phar /usr/local/bin/wp-orig && \
51
+ echo '#!/bin/bash' > /usr/local/bin/wp-cli-wrapper && \
52
+ echo 'exec wp-orig --allow-root "$@"' >> /usr/local/bin/wp-cli-wrapper && \
53
+ chmod +x /usr/local/bin/wp-cli-wrapper && \
54
+ ln -s /usr/local/bin/wp-cli-wrapper /usr/local/bin/wp
55
+
56
EXPOSE 9000
57
EXPOSE 9003
0 commit comments