From b3aa3f1171a765d336622dac484a3695f0d1deed Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Thu, 15 Jun 2023 11:13:45 +1000 Subject: [PATCH 1/2] wp-env: try to fix failing php 8.2 github action --- packages/env/lib/init-config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/env/lib/init-config.js b/packages/env/lib/init-config.js index fad8d5b36f1834..adcdd7a8aff452 100644 --- a/packages/env/lib/init-config.js +++ b/packages/env/lib/init-config.js @@ -124,6 +124,7 @@ function wordpressDockerFileContents( env, config ) { # Update apt sources for archived versions of Debian. # stretch (https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html) +RUN touch /etc/apt/sources.list RUN sed -i 's|deb.debian.org/debian stretch|archive.debian.org/debian stretch|g' /etc/apt/sources.list RUN sed -i 's|security.debian.org/debian-security stretch|archive.debian.org/debian-security stretch|g' /etc/apt/sources.list RUN sed -i '/stretch-updates/d' /etc/apt/sources.list @@ -167,7 +168,7 @@ RUN adduser -h /home/$HOST_USERNAME -G $( getent group $HOST_GID | cut -d: -f1 ) # Install any dependencies we need in the container. ${ installDependencies( 'cli', env, config ) } - + # Switch back to the original user now that we're done. USER www-data From b3a9d6b5acca229a2808f8ba426cc8218ef8c82e Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Thu, 15 Jun 2023 11:44:29 +1000 Subject: [PATCH 2/2] Add git --- packages/env/lib/init-config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/env/lib/init-config.js b/packages/env/lib/init-config.js index adcdd7a8aff452..efde002dc58389 100644 --- a/packages/env/lib/init-config.js +++ b/packages/env/lib/init-config.js @@ -201,6 +201,9 @@ RUN apt-get -qy update # Install some basic PHP dependencies. RUN apt-get -qy install $PHPIZE_DEPS && touch /usr/local/etc/php/php.ini +# Install git +RUN apt-get -qy install git + # Set up sudo so they can have root access. RUN apt-get -qy install sudo RUN echo "#$HOST_UID ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers`;