Skip to content

Commit

Permalink
feat: update to php:8.3.0-bullseye
Browse files Browse the repository at this point in the history
  • Loading branch information
ronisaha committed Dec 9, 2023
1 parent 05271fe commit 508eca5
Show file tree
Hide file tree
Showing 13 changed files with 168 additions and 230 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ jobs:
do
folder=${dockerFilePath%"/Dockerfile"}
VERSION=${folder##*/}
PHP_VERSION=8.2.13
PHP_VERSION=8.3.0
tmpName="image-$RANDOM"
cp -r fonts $folder/
docker build $folder --file $folder/Dockerfile --tag $tmpName --build-arg PHP_VERSION=$PHP_VERSION
IMAGE_ID=${{ secrets.DOCKER_REGISTRY_URL }}/${{ secrets.IMAGE_NAME }}
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# php-8-debain
Docker image with php:8.2.x-bullseye
Docker image with php:8.3.x-bullseye

All image contain following php extension, [wkhtmltopdf-0.12.6](https://github.com/wkhtmltopdf/wkhtmltopdf/) with patched QT, [merge2pdf](https://github.com/ajaxray/merge2pdf) and [composer](https://github.com/composer/composer).
All image contain following php extension and [composer](https://github.com/composer/composer).

- bcmath
- gd
Expand All @@ -13,7 +13,7 @@ All image contain following php extension, [wkhtmltopdf-0.12.6](https://github.c
- PDO
- pdo_pgsql
- pdo_mysql
- oci8
- oci8(Only in oci variant)
- SimpleXML
- tokenizer
- Zend OPcache
Expand All @@ -25,10 +25,11 @@ All image contain following php extension, [wkhtmltopdf-0.12.6](https://github.c
- curl
- exif
- iconv
- xdebug(Only in cli and dev variant)

## Image Variants
### php-8-debain:cli or php-8-debain:cli-{php-version}
This use the cli base image with xdebug enabled, also contain nodejs-18.x and npm
This use the cli base image with xdebug enabled, also contain nodejs-20.x and npm

### php-8-debain:fpm or php-8-debain:fpm-{php-version}
This use the fpm base image
Expand All @@ -39,5 +40,8 @@ This use the apache base image
### php-8-debain:dev or php-8-debain:dev-{php-version}
This use the apache base image with xdebug enabled

### php-8-debain:oci or php-8-debain:oci-{php-version}
This use the fpm base image with oci8 extension enabled.

### php-8-debain:supervisor or php-8-debain:supervisor-{php-version}
This use the fpm base image and set supervisor as entry point. Mount any supervisor config file as /etc/supervisor/conf.d/*.conf
This use the cli base image and set supervisor as entry point. Mount any supervisor config file as /etc/supervisor/conf.d/*.conf
43 changes: 3 additions & 40 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=8.2.13
ARG PHP_VERSION=8.3.0
FROM php:${PHP_VERSION}-apache-bullseye

LABEL org.opencontainers.image.authors="Roni Kumar Saha <[email protected]>"
Expand All @@ -8,16 +8,14 @@ ENV APACHE_DOCUMENT_ROOT /var/www/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

ENV LD_LIBRARY_PATH=/usr/lib/instantclient

#install exetentions and dependencies
RUN set -eux; \
\
sed -i'.bak' 's/$/ contrib/' /etc/apt/sources.list; \
apt-get update && apt-get -y upgrade; \
apt-get install -y libaio1 wget unzip \
libicu-dev \
libzip-dev \
libzip-dev \
libyaml-dev \
gettext \
libmagickwand-dev\
Expand All @@ -26,17 +24,8 @@ RUN set -eux; \
imagemagick \
libxslt1-dev \
\
fontconfig \
libfreetype6 \
libjpeg62-turbo \
libpng16-16 \
libx11-6 \
libxcb1 \
libxext6 \
libxrender1 \
xfonts-75dpi \
xfonts-base \
ttf-mscorefonts-installer \
; \
\
pecl install apcu; \
Expand All @@ -61,28 +50,10 @@ RUN set -eux; \
sockets; \
echo 'yes,yes' | pecl install redis; \
docker-php-ext-enable redis; \
cd /tmp; \
curl -L -O https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
dpkg -i wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
rm -rf wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip ; \
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip \
;\
unzip instantclient-basiclite-linuxx64.zip ; \
unzip instantclient-sdk-linuxx64.zip ;\
rm -f instantclient-basiclite-linuxx64.zip; \
rm -f instantclient-sdk-linuxx64.zip; \
mv instantclient*/ /usr/lib/instantclient; \
cd /usr/lib/instantclient ; \
rm -f *jdbc* *occi* *mysql* *README *jar uidrvci genezi adrci; \
echo /usr/lib/instantclient > /etc/ld.so.conf.d/oracle-instantclient.conf ;\
ldconfig ;\
echo 'instantclient,/usr/lib/instantclient' | pecl install oci8; \
docker-php-ext-enable oci8; \
curl -L https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions > /usr/local/bin/install-php-extensions \
; \
chmod +x /usr/local/bin/install-php-extensions ; \
install-php-extensions gd imagick amqp; \
install-php-extensions gd Imagick/imagick@master amqp; \
rm -f /usr/local/bin/install-php-extensions; \
\
docker-php-source delete ;\
Expand Down Expand Up @@ -123,11 +94,3 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER=1

RUN a2enmod rewrite

RUN set -eux; \
\
curl -L https://github.com/ajaxray/merge2pdf/releases/download/v1.1.0/merge2pdf_linux-amd64.OS -o /usr/local/bin/merge2pdf; \
chmod +x /usr/local/bin/merge2pdf
## Copy Custom Fonts
COPY fonts /usr/share/fonts/truetype
RUN fc-cache -f -v
51 changes: 11 additions & 40 deletions cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=8.2.13
ARG PHP_VERSION=8.3.0
FROM php:${PHP_VERSION}-cli-bullseye

LABEL org.opencontainers.image.authors="Roni Kumar Saha <[email protected]>"
Expand All @@ -10,9 +10,15 @@ RUN set -eux; \
\
sed -i'.bak' 's/$/ contrib/' /etc/apt/sources.list; \
apt-get update && apt-get -y upgrade; \
apt-get install -y ca-certificates curl gnupg; \
mkdir -p /etc/apt/keyrings; \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
NODE_MAJOR=20 \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
apt-get update; \
apt-get install -y libaio1 wget unzip \
libicu-dev \
libzip-dev \
libzip-dev \
libyaml-dev \
gettext \
libmagickwand-dev\
Expand All @@ -21,22 +27,12 @@ RUN set -eux; \
imagemagick \
libxslt1-dev \
\
fontconfig \
libfreetype6 \
libjpeg62-turbo \
libpng16-16 \
libx11-6 \
libxcb1 \
libxext6 \
libxrender1 \
xfonts-75dpi \
xfonts-base \
ttf-mscorefonts-installer \
; \
\
curl -sL https://deb.nodesource.com/setup_18.x | bash - ; \
apt-get -y install nodejs; \
pecl install apcu; \
pecl install apcu; \
pecl install yaml; \
pecl install igbinary; \
docker-php-ext-enable apcu yaml igbinary; \
Expand All @@ -58,29 +54,12 @@ RUN set -eux; \
sockets; \
echo 'yes,yes' | pecl install redis; \
docker-php-ext-enable redis; \
cd /tmp; \
curl -L -O https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
dpkg -i wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
rm -rf wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip ; \
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip \
;\
unzip instantclient-basiclite-linuxx64.zip ; \
unzip instantclient-sdk-linuxx64.zip ;\
rm -f instantclient-basiclite-linuxx64.zip; \
rm -f instantclient-sdk-linuxx64.zip; \
mv instantclient*/ /usr/lib/instantclient; \
cd /usr/lib/instantclient ; \
rm -f *jdbc* *occi* *mysql* *README *jar uidrvci genezi adrci; \
echo /usr/lib/instantclient > /etc/ld.so.conf.d/oracle-instantclient.conf ;\
ldconfig ;\
echo 'instantclient,/usr/lib/instantclient' | pecl install oci8; \
pecl install xdebug; \
docker-php-ext-enable oci8 xdebug; \
docker-php-ext-enable xdebug; \
curl -L https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions > /usr/local/bin/install-php-extensions \
; \
chmod +x /usr/local/bin/install-php-extensions ; \
install-php-extensions gd imagick amqp; \
install-php-extensions gd Imagick/imagick@master amqp; \
rm -f /usr/local/bin/install-php-extensions; \
\
docker-php-source delete ;\
Expand Down Expand Up @@ -117,11 +96,3 @@ RUN { \
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

ENV COMPOSER_ALLOW_SUPERUSER=1

RUN set -eux; \
\
curl -L https://github.com/ajaxray/merge2pdf/releases/download/v1.1.0/merge2pdf_linux-amd64.OS -o /usr/local/bin/merge2pdf; \
chmod +x /usr/local/bin/merge2pdf
## Copy Custom Fonts
COPY fonts /usr/share/fonts/truetype
RUN fc-cache -f -v
50 changes: 7 additions & 43 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=8.2.13
ARG PHP_VERSION=8.3.0
FROM php:${PHP_VERSION}-apache-bullseye

LABEL org.opencontainers.image.authors="Roni Kumar Saha <[email protected]>"
Expand All @@ -8,16 +8,14 @@ ENV APACHE_DOCUMENT_ROOT /var/www/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

ENV LD_LIBRARY_PATH=/usr/lib/instantclient

#install exetentions and dependencies
RUN set -eux; \
\
sed -i'.bak' 's/$/ contrib/' /etc/apt/sources.list; \
apt-get update && apt-get -y upgrade; \
apt-get install -y libaio1 wget unzip \
libicu-dev \
libzip-dev \
libzip-dev \
libyaml-dev \
gettext \
libmagickwand-dev\
Expand All @@ -26,17 +24,8 @@ RUN set -eux; \
imagemagick \
libxslt1-dev \
\
fontconfig \
libfreetype6 \
libjpeg62-turbo \
libpng16-16 \
libx11-6 \
libxcb1 \
libxext6 \
libxrender1 \
xfonts-75dpi \
xfonts-base \
ttf-mscorefonts-installer \
; \
\
pecl install apcu; \
Expand All @@ -61,31 +50,14 @@ RUN set -eux; \
sockets; \
echo 'yes,yes' | pecl install redis; \
docker-php-ext-enable redis; \
cd /tmp; \
curl -L -O https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
dpkg -i wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
rm -rf wkhtmltox_0.12.6.1-2.bullseye_amd64.deb; \
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip ; \
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip \
;\
unzip instantclient-basiclite-linuxx64.zip ; \
unzip instantclient-sdk-linuxx64.zip ;\
rm -f instantclient-basiclite-linuxx64.zip; \
rm -f instantclient-sdk-linuxx64.zip; \
mv instantclient*/ /usr/lib/instantclient; \
cd /usr/lib/instantclient ; \
rm -f *jdbc* *occi* *mysql* *README *jar uidrvci genezi adrci; \
echo /usr/lib/instantclient > /etc/ld.so.conf.d/oracle-instantclient.conf ;\
ldconfig ;\
echo 'instantclient,/usr/lib/instantclient' | pecl install oci8; \
pecl install xdebug; \
pecl install xdebug \
docker-php-ext-enable xdebug; \
curl -L https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions > /usr/local/bin/install-php-extensions \
; \
; \
chmod +x /usr/local/bin/install-php-extensions ; \
install-php-extensions gd imagick amqp; \
rm -f /usr/local/bin/install-php-extensions; \
\
docker-php-ext-enable oci8 xdebug; \
install-php-extensions gd Imagick/imagick@master amqp; \
rm -f /usr/local/bin/install-php-extensions; \
docker-php-source delete ;\
apt-get remove -y g++ wget ;\
apt-get autoremove --purge -y && apt-get autoclean -y && apt-get clean -y ;\
Expand Down Expand Up @@ -124,11 +96,3 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER=1

RUN a2enmod rewrite

RUN set -eux; \
\
curl -L https://github.com/ajaxray/merge2pdf/releases/download/v1.1.0/merge2pdf_linux-amd64.OS -o /usr/local/bin/merge2pdf; \
chmod +x /usr/local/bin/merge2pdf
## Copy Custom Fonts
COPY fonts /usr/share/fonts/truetype
RUN fc-cache -f -v
Binary file removed fonts/Arial Narrow Bold Italic.ttf
Binary file not shown.
Binary file removed fonts/Arial Narrow Bold.ttf
Binary file not shown.
Binary file removed fonts/Arial Narrow Italic.ttf
Binary file not shown.
Binary file removed fonts/Arial Narrow.ttf
Binary file not shown.
Binary file removed fonts/SolaimanLipi.ttf
Binary file not shown.
Loading

0 comments on commit 508eca5

Please sign in to comment.