Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openlitespeed/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ RUN wget -O - https://repo.litespeed.sh | bash \
rm -rf /var/lib/apt/lists/* && \
apt-get clean && apt-get autoremove -y

# Install Composer and WP-CLI
# Install Composer and WP-CLI (nightly until a stable release fixes https://github.com/wp-cli/wp-cli/issues/6396)
RUN wget -qO /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar \
&& chmod +x /usr/local/bin/composer \
&& wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar \
&& chmod +x /usr/local/bin/wp \
&& echo "alias wp='wp --allow-root'" >> /root/.bashrc

Expand Down
9 changes: 5 additions & 4 deletions php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ RUN apk add --no-cache curl \
&& rm -rf /var/cache/apk/*

# Stage for WP-CLI
# Nightly build: the latest stable (2.12.0) breaks `wp core download` for WordPress 7
# (https://github.com/wp-cli/wp-cli/issues/6396). Move back to wp-cli.phar once a fixed stable ships.
FROM php:${PHP_VERSION}-cli-alpine AS wpcli_builder
COPY wp-cli-packages.json /root/.wp-cli/packages/composer.json
RUN apk add --no-cache curl unzip \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& curl -fsSLo wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar \
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp \
&& mkdir -p /root/.wp-cli/packages \
&& cd /root/.wp-cli/packages \
&& composer init --name=wp-cli/wp-cli-packages --stability=stable --no-interaction \
&& composer require wp-cli/doctor-command:@stable --prefer-dist --no-interaction \
&& composer require wp-cli/doctor-command:^3 --prefer-dist --no-interaction \
&& mkdir -p /home/www-data/.wp-cli \
&& mv /root/.wp-cli/packages /home/www-data/.wp-cli/ \
&& chown -R www-data:www-data /home/www-data/.wp-cli \
Expand Down
15 changes: 15 additions & 0 deletions php/wp-cli-packages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "wp-cli/wp-cli-packages",
"description": "WP-CLI packages. The framework and bundled commands come from the wp-cli phar, so they are replaced here to keep a second copy out of vendor/.",
"minimum-stability": "dev",
"prefer-stable": true,
"replace": {
"wp-cli/wp-cli": "*",
"wp-cli/checksum-command": "*",
"wp-cli/core-command": "*",
"wp-cli/cron-command": "*",
"wp-cli/entity-command": "*",
"wp-cli/extension-command": "*",
"wp-cli/language-command": "*"
}
}
Loading