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
59 changes: 55 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/actions/actions-runner:latest
FROM ghcr.io/actions/actions-runner:2.329.0

USER root

Expand Down Expand Up @@ -44,48 +44,99 @@
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Add PHP repository and install PHP 8.1, 8.2, and 8.3
# Add PHP repository and install PHP 8.1, 8.2, 8.3, 8.4, 8.5 and common extensions
RUN add-apt-repository -y ppa:ondrej/php \
&& apt-get update \
&& apt-get install -y --no-install-recommends \

# PHP 8.1 with common extensions
php8.1 \
php8.1-cli \
php8.1-common \
php8.1-curl \
php8.1-gd \
php8.1-mbstring \
php8.1-mysqli \
php8.1-pdo-mysql \
php8.1-xml \
php8.1-zip \
php8.1-bcmath \
php8.1-opcache \
php8.1-intl \

# PHP 8.2 with common extensions
php8.2 \
php8.2-cli \
php8.2-common \
php8.2-curl \
php8.2-gd \
php8.2-mbstring \
php8.2-mysqli \
php8.2-pdo-mysql \
php8.2-xml \
php8.2-zip \
php8.2-bcmath \
php8.2-intl \
php8.2-opcache \

# PHP 8.3 with common extensions
php8.3 \
php8.3-cli \
php8.3-common \
php8.3-curl \
php8.3-gd \
php8.3-mbstring \
php8.3-mysqli \
php8.3-pdo-mysql \
php8.3-xml \
php8.3-zip \
php8.3-bcmath \
php8.3-intl \
php8.3-opcache \

# PHP 8.4 with common extensions
php8.4 \
php8.4-cli \
php8.4-common \
php8.4-curl \
php8.4-gd \
php8.4-mbstring \
php8.4-mysqli \
php8.4-pdo-mysql \
php8.4-xml \
php8.4-zip \
php8.4-bcmath \
php8.4-intl \
php8.4-opcache \

# PHP 8.5 with common extensions
php8.5 \
php8.5-cli \
php8.5-common \
php8.5-curl \
php8.5-gd \
php8.5-mbstring \
php8.5-mysqli \
php8.5-pdo-mysql \
php8.5-xml \
php8.5-zip \
php8.5-bcmath \
php8.5-intl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Check warning on line 126 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Check

Empty continuation lines will become errors in a future release

NoEmptyContinuation: Empty continuation line More info: https://docs.docker.com/go/dockerfile/rule/no-empty-continuation/

# Install Composer globally
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# Configure PHP: Register all PHP versions and set php8.5 as default
RUN update-alternatives --install /usr/bin/php php /usr/bin/php8.1 81 \
&& update-alternatives --install /usr/bin/php php /usr/bin/php8.2 82 \
&& update-alternatives --install /usr/bin/php php /usr/bin/php8.3 83 \
&& update-alternatives --install /usr/bin/php php /usr/bin/php8.4 84 \
&& update-alternatives --install /usr/bin/php php /usr/bin/php8.5 85 \
&& update-alternatives --set php /usr/bin/php8.5

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin \
--filename=composer \
&& chmod +x /usr/local/bin/composer

# Install AWS CLI
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ This image comes with the following software and tools pre-installed:

* **Node.js 18.x**: A modern version of Node.js for JavaScript-based tools and applications.
* **Python 3**: The latest stable version of Python available in the base image's repositories.
* **PHP 8.1, 8.2, 8.3, 8.4,8.5**: Multiple PHP versions with common extensions pre-installed (mbstring, intl, mysqli, pdo_mysql, gd, xml, zip, curl, bcmath, opcache). PHP 8.5 is set as the default `php` command, while all versions are accessible via `php8.1`, `php8.2`, `php8.3`, `php8.4` and `php8.5`.

### Package Managers

* **npm** (via Node.js)
* **yarn**: A popular JavaScript package manager.
* **pip3** (via Python 3)
* **Composer**: PHP dependency manager, installed globally and available system-wide.

### Cloud & DevOps Tools

Expand Down