Skip to content

Commit 1af68ab

Browse files
authored
Upgrade Node.js version to 22.x (#18)
Update the Dockerfile to use Node.js version 22.x. * **Dockerfile** - Update the Node.js setup script to use version 22.x from the NodeSource repository. - Update the comment to reflect the new Node.js version. * **README.md** - Update the Node.js version in the Utilities section to 22. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/appsinet/php_development?shareId=XXXX-XXXX-XXXX-XXXX).
1 parent f0b3e80 commit 1af68ab

File tree

2 files changed

+44
-44
lines changed

2 files changed

+44
-44
lines changed

Dockerfile

+42-42
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
FROM php:8.2-fpm-bullseye
2-
3-
WORKDIR /var/www/html
4-
5-
# Install base packages and repositories
6-
RUN apt-get update \
7-
&& apt-get install -y git gnupg mariadb-client libicu-dev libfreetype6-dev libjpeg-dev libpng-dev libpq-dev libzip-dev postgresql-client unzip wget zip zlib1g-dev gnupg2 rsync
8-
9-
# Install ansible
10-
RUN echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu focal main" > /etc/apt/sources.list.d/ansible.list
11-
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
12-
RUN apt-get update \
13-
&& apt-get install -y ansible ansible-core ansible-lint
14-
15-
# Install php packages and configure php.ini
16-
RUN echo 'memory_limit=256M' > /usr/local/etc/php/conf.d/memory-limit.ini
17-
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
18-
RUN docker-php-ext-install intl gd opcache pdo_mysql pdo_pgsql zip
19-
RUN pecl install pcov xdebug \
20-
&& docker-php-ext-enable pcov xdebug
21-
22-
# # Configure xdebug but do not enable it (to enable add it conf.d in same path)
23-
# RUN rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
24-
# ADD docker-php-ext-xdebug.ini /usr/local/etc/php/docker-php-ext-xdebug.ini
25-
26-
COPY install_composer.sh install_composer.sh
27-
RUN sh install_composer.sh \
28-
&& mv composer.phar /usr/local/bin/composer
29-
30-
RUN wget https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.6/local-php-security-checker_2.0.6_linux_amd64 \
31-
&& chmod +x local-php-security-checker_2.0.6_linux_amd64 \
32-
&& mv local-php-security-checker_2.0.6_linux_amd64 /usr/local/bin/local-php-security-checker
33-
34-
# Ansistrano roles for deployment
35-
RUN ansible-galaxy install ansistrano.deploy ansistrano.rollback
36-
37-
# Install Node and yarn
38-
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
39-
RUN apt-get install -y nodejs
40-
RUN corepack enable
41-
# Add sentry-cli
42-
RUN curl -sL https://sentry.io/get-cli/ | bash
1+
FROM php:8.2-fpm-bullseye
2+
3+
WORKDIR /var/www/html
4+
5+
# Install base packages and repositories
6+
RUN apt-get update \
7+
&& apt-get install -y git gnupg mariadb-client libicu-dev libfreetype6-dev libjpeg-dev libpng-dev libpq-dev libzip-dev postgresql-client unzip wget zip zlib1g-dev gnupg2 rsync
8+
9+
# Install ansible
10+
RUN echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu focal main" > /etc/apt/sources.list.d/ansible.list
11+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
12+
RUN apt-get update \
13+
&& apt-get install -y ansible ansible-core ansible-lint
14+
15+
# Install php packages and configure php.ini
16+
RUN echo 'memory_limit=256M' > /usr/local/etc/php/conf.d/memory-limit.ini
17+
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
18+
RUN docker-php-ext-install intl gd opcache pdo_mysql pdo_pgsql zip
19+
RUN pecl install pcov xdebug \
20+
&& docker-php-ext-enable pcov xdebug
21+
22+
# # Configure xdebug but do not enable it (to enable add it conf.d in same path)
23+
# RUN rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
24+
# ADD docker-php-ext-xdebug.ini /usr/local/etc/php/docker-php-ext-xdebug.ini
25+
26+
COPY install_composer.sh install_composer.sh
27+
RUN sh install_composer.sh \
28+
&& mv composer.phar /usr/local/bin/composer
29+
30+
RUN wget https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.6/local-php-security-checker_2.0.6_linux_amd64 \
31+
&& chmod +x local-php-security-checker_2.0.6_linux_amd64 \
32+
&& mv local-php-security-checker_2.0.6_linux_amd64 /usr/local/bin/local-php-security-checker
33+
34+
# Ansistrano roles for deployment
35+
RUN ansible-galaxy install ansistrano.deploy ansistrano.rollback
36+
37+
# Install Node and yarn
38+
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
39+
RUN apt-get install -y nodejs
40+
RUN corepack enable
41+
# Add sentry-cli
42+
RUN curl -sL https://sentry.io/get-cli/ | bash

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ A Docker image based on official PHP, with some extras for development / CI.
1919
- composer
2020
- local-php-security-checker
2121
- mariadb-client
22-
- node 18
22+
- node 22
2323
- postgresql-client
24-
- sentry cli
24+
- sentry cli

0 commit comments

Comments
 (0)