Skip to content

Commit c1fd2f5

Browse files
committed
wp-cli fixes, wp core update now works correctly
1 parent c63cdb0 commit c1fd2f5

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ RUN mkdir -p /var/log/wordpress \
9999
&& touch /var/log/wordpress/debug.log \
100100
&& chown -R www-data:www-data /var/log/wordpress
101101

102+
# Install less for wp-cli's pager
103+
RUN apt-get update -yqq \
104+
&& apt-get install -y less \
105+
&& rm -rf /var/lib/apt/lists/*
106+
107+
# Install wp-cli since the native image is a bowl of permissions errors
108+
RUN curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar > /usr/local/bin/wp \
109+
&& chmod +x /usr/local/bin/wp
110+
102111
# Install npm so we can run npx sort-package-json from the init script
103112
RUN apt-get update -yqq \
104113
&& apt-get install -y --no-install-recommends \

boilerplate-tooling/docker-compose-util.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
services:
22
wp-cli:
3-
image: wordpress:cli-2.5.0-php7.4
4-
user: "${UID:-1000}:${GID:-1000}"
53
depends_on:
64
- db
75
- wordpress
8-
environment:
9-
- WORDPRESS_DB_HOST=db:3306
10-
- WORDPRESS_DB_USER=wordpress
11-
- WORDPRESS_DB_PASSWORD=wordpress
6+
# image: ideasonpurpose/wordpress:dev
7+
image: ideasonpurpose/wordpress:0.7.15
8+
user: www-data
129
volumes:
1310
- wp_data:/var/www/html
1411
- ./wp-content/themes/${npm_package_name:-ioptheme}:/var/www/html/wp-content/themes/${npm_package_name:-ioptheme}
1512
- ./wp-content/plugins:/var/www/html/wp-content/plugins
1613
- ./wp-content/uploads:/var/www/html/wp-content/uploads
17-
entrypoint: wp
18-
command: theme activate ${npm_package_name:-ioptheme}
14+
environment:
15+
- WP_CLI_CACHE_DIR=/tmp/wp-cli
16+
- WP_CLI_DISABLE_AUTO_CHECK_UPDATE=true
17+
command: wp theme activate ${npm_package_name:-ioptheme}
1918

2019
composer:
2120
image: composer:2.1.6

0 commit comments

Comments
 (0)