From ae71a659f7f693413e3a706523022344585b59bb Mon Sep 17 00:00:00 2001 From: Erick Hitter <git-contrib@ethitter.com> Date: Sun, 12 Jun 2022 15:54:21 -0700 Subject: [PATCH] Add nvm for node management Adding to the PHP images because certain WP-specific Grunt tasks rely on PHP, so it makes sense to have it all in one place. See also https://git.ethitter.com/gitlab/ci/wordpress/-/issues/1 --- php/5.6/Dockerfile | 5 ++++- php/7.0/Dockerfile | 5 ++++- php/7.1/Dockerfile | 5 ++++- php/7.2/Dockerfile | 5 ++++- php/7.3/Dockerfile | 5 ++++- php/7.4/Dockerfile | 5 ++++- php/8.0/Dockerfile | 5 ++++- php/8.1/Dockerfile | 5 ++++- 8 files changed, 32 insertions(+), 8 deletions(-) diff --git a/php/5.6/Dockerfile b/php/5.6/Dockerfile index 46b3c84..9ea37ab 100644 --- a/php/5.6/Dockerfile +++ b/php/5.6/Dockerfile @@ -33,6 +33,9 @@ RUN docker-php-ext-install \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && composer --version \ + && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \ + && nvm --version ENV PATH=/root/.composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH diff --git a/php/7.0/Dockerfile b/php/7.0/Dockerfile index 958c048..76854b8 100644 --- a/php/7.0/Dockerfile +++ b/php/7.0/Dockerfile @@ -33,6 +33,9 @@ RUN docker-php-ext-install \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && composer --version \ + && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \ + && nvm --version ENV PATH=/root/.composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH diff --git a/php/7.1/Dockerfile b/php/7.1/Dockerfile index 744b054..6de65ff 100644 --- a/php/7.1/Dockerfile +++ b/php/7.1/Dockerfile @@ -33,6 +33,9 @@ RUN docker-php-ext-install \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && composer --version \ + && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \ + && nvm --version ENV PATH=/root/.composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH diff --git a/php/7.2/Dockerfile b/php/7.2/Dockerfile index e24819f..60c46d4 100644 --- a/php/7.2/Dockerfile +++ b/php/7.2/Dockerfile @@ -34,6 +34,9 @@ RUN docker-php-ext-install \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && composer --version \ + && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \ + && nvm --version ENV PATH=/root/.composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH diff --git a/php/7.3/Dockerfile b/php/7.3/Dockerfile index bf96670..0840ee7 100644 --- a/php/7.3/Dockerfile +++ b/php/7.3/Dockerfile @@ -34,6 +34,9 @@ RUN docker-php-ext-install \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && composer --version \ + && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \ + && nvm --version ENV PATH=/root/.composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH diff --git a/php/7.4/Dockerfile b/php/7.4/Dockerfile index 5b951ff..78783ce 100644 --- a/php/7.4/Dockerfile +++ b/php/7.4/Dockerfile @@ -34,6 +34,9 @@ RUN docker-php-ext-install \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && composer --version \ + && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \ + && nvm --version ENV PATH=/root/.composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH diff --git a/php/8.0/Dockerfile b/php/8.0/Dockerfile index bb262cd..827f649 100644 --- a/php/8.0/Dockerfile +++ b/php/8.0/Dockerfile @@ -34,6 +34,9 @@ RUN docker-php-ext-install \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && composer --version \ + && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \ + && nvm --version ENV PATH=/root/.composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH diff --git a/php/8.1/Dockerfile b/php/8.1/Dockerfile index 2db6367..0083291 100644 --- a/php/8.1/Dockerfile +++ b/php/8.1/Dockerfile @@ -34,6 +34,9 @@ RUN docker-php-ext-install \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && chmod +x /usr/local/bin/composer + && chmod +x /usr/local/bin/composer \ + && composer --version \ + && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \ + && nvm --version ENV PATH=/root/.composer/vendor/bin:$HOME/.composer/vendor/bin:$PATH -- GitLab