Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BR-11851: Make Shadow and basefdir compatible with PHP84 #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
72 changes: 60 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,68 @@
FROM amazonlinux:2
FROM amazonlinux:2023

ARG PHP_BUILD_DIR=/var/task
ARG PHP_CONF_DIR=/etc/php.d
ARG PHP_EXT_DIR=/usr/lib64/php/modules
ARG PHP_EXT_DIR=/usr/local/php/lib/php/extensions/no-debug-non-zts-20240924
ARG PHP_VERSION=8.4.1

RUN yum install -y amazon-linux-extras
RUN amazon-linux-extras enable php8.2
RUN amazon-linux-extras install -y php8.2
RUN yum clean all && \
yum -y upgrade && \
yum -y install ilibzip-dev libonig-dev putils gcc make \
yum -y re2c \
yum-utils
RUN yum install -y \
gcc \
make \
autoconf \
bison \
re2c \
libxml2-devel \
libzip-devel \
oniguruma-devel \
curl-devel \
libpng-devel \
libjpeg-devel \
freetype-devel \
openssl-devel \
sqlite-devel \
bzip2-devel \
libcurl-devel \
libicu-devel \
libxslt-devel \
libffi-devel \
systemd-devel \
git \
tar \
wget \
&& yum clean all

RUN yum -y install php-cli php-common php-devel && \
yum clean all
RUN wget https://www.php.net/distributions/php-${PHP_VERSION}.tar.gz \
&& tar -xzf php-${PHP_VERSION}.tar.gz -C /usr/local/src \
&& rm php-${PHP_VERSION}.tar.gz

RUN cd /usr/local/src/php-${PHP_VERSION} \
&& ./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-config-file-scan-dir=/usr/local/php/etc/conf.d \
--enable-mbstring \
--with-curl \
--with-openssl \
--with-zlib \
--enable-bcmath \
--enable-mbregex \
--enable-pcntl \
--enable-sockets \
--with-mysqli \
--with-pdo-mysql \
--with-pdo-sqlite \
--with-zip \
--with-gd \
--with-jpeg \
--with-freetype \
--enable-opcache \
--enable-fpm \
&& make -j"$(nproc)" \
&& make install

RUN ln -s /usr/local/php/bin/php /usr/bin/php \
&& ln -s /usr/local/php/bin/phpize /usr/bin/phpize \
&& ln -s /usr/local/php/bin/php-config /usr/bin/php-config

#Extension install
RUN mkdir -p ${PHP_EXT_DIR} && mkdir -p ${PHP_CONF_DIR}
Expand Down
Loading