From 8322ea2fccafb3975f34df4a7c0941f7f1e662c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=93=99=F0=9D=93=BE=F0=9D=93=B5=F0=9D=93=B2?= =?UTF-8?q?=F0=9D=93=B8?= Date: Wed, 19 Jun 2024 02:42:47 +0100 Subject: [PATCH] Add php82/Dockerfile --- php82/Dockerfile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 php82/Dockerfile diff --git a/php82/Dockerfile b/php82/Dockerfile new file mode 100644 index 0000000..ff34579 --- /dev/null +++ b/php82/Dockerfile @@ -0,0 +1,43 @@ +# Use the official PHP 8.2.16-fpm-bullseye base image +FROM php:8.2.16-fpm-bullseye + +# Update package lists and install necessary packages +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + net-tools \ + wget \ + curl \ + libssl-dev \ + libnss3 \ + nano \ + procps \ + nodejs \ + gcc \ + g++ \ + make \ + yarn && \ + rm -rf /var/lib/apt/lists/* + +# Install Composer +RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php && \ + HASH=`curl -sS https://composer.github.io/installer.sig` && \ + php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('/tmp/composer-setup.php'); } echo PHP_EOL;" && \ + php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \ + rm -rf /tmp/composer-setup.php + +# Add nodesource repository for Node.js +RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && \ + bash nodesource_setup.sh && \ + rm nodesource_setup.sh + +# Add Yarn repository and key +RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null && \ + echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list + +# Install PHP extensions using mlocati's script +RUN curl -sSLf -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \ + chmod +x /usr/local/bin/install-php-extensions && \ + install-php-extensions gd bz2 zip redis pdo_mysql mysqli mcrypt + +WORKDIR /srv +USER root \ No newline at end of file