Skip to content

Commit 3c743e7

Browse files
authored
fix: ci build failures php containers (#28)
* fix: fix build failure related to composer git clone using ssh * fix: Use git repo instead of package name * fix: build failure * chore: update to latest build-push-action@v6 * chore: update actions version and add continue-on-error * use composer instead of wp cli * remove temporary workflow adjustments * remove temporary workflow adjustments
1 parent 4c735df commit 3c743e7

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎php/Dockerfile‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ RUN apk add --no-cache curl \
88

99
# Stage for WP-CLI
1010
FROM php:${PHP_VERSION}-cli-alpine AS wpcli_builder
11-
RUN apk add --no-cache curl \
11+
RUN apk add --no-cache curl unzip \
12+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
1213
&& curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
1314
&& chmod +x wp-cli.phar \
1415
&& mv wp-cli.phar /usr/local/bin/wp \
15-
&& wp package install wp-cli/doctor-command:@stable --allow-root \
16+
&& mkdir -p /root/.wp-cli/packages \
17+
&& cd /root/.wp-cli/packages \
18+
&& composer init --name=wp-cli/wp-cli-packages --stability=stable --no-interaction \
19+
&& composer require wp-cli/doctor-command:@stable --prefer-dist --no-interaction \
1620
&& mkdir -p /home/www-data/.wp-cli \
17-
&& mv ~/.wp-cli/packages /home/www-data/.wp-cli/ \
21+
&& mv /root/.wp-cli/packages /home/www-data/.wp-cli/ \
1822
&& chown -R www-data:www-data /home/www-data/.wp-cli \
1923
&& rm -rf /var/cache/apk/*
2024

0 commit comments

Comments
 (0)