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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@

### Minor changes

* **2026-10-12**
* The README only describes the images and links to the documentation of each topic in the `docs` directory (extensions, php.ini, variants, processes, debugging, advanced features, contributing)
* Add `APACHE_HTTP_PORT` and `APACHE_HTTPS_PORT` to change the ports Apache listens on (e.g. unprivileged ports)
* Add `COMPOSER_VERSION` to install another Composer version (exact version or `1`, `2`, `2.2` channel), at the container start or at the build of a slim image
* Add `LOCALES` to generate locales at the container start (e.g. `LOCALES=fr_FR.UTF-8 de_DE.UTF-8`): the `locales` package is installed in the fat images (~17MB) and with `ARG INSTALL_LOCALES=1` in the slim images
* Add `DAEMON_COMMAND_*` (and `DAEMON_USER_*`, `docker` by default) to run long-running processes along with the main command (one container per process remains recommended): as soon as one of them exits, the container stops
* Supercronic is supervised the same way: the container stops if Supercronic exits (it kept running without cron jobs before), and the cron jobs start after the startup commands

* **2026-10-09**
* Imagick can read SVG images (also WMF, DjVu and OpenEXR): the fat images are ~17MB larger
* Add the `opentelemetry` extension on PHP 8.2+
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.apache
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)
ARG INSTALL_CRON=1
ARG INSTALL_COMPOSER=1
ARG INSTALL_LOCALES=1
ARG PHP_VERSION="8.4"
ARG GLOBAL_VERSION="v5"
ARG REPO="thecodingmachine/php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)
ARG INSTALL_CRON=1
ARG INSTALL_COMPOSER=1
ARG INSTALL_LOCALES=1
ARG PHP_VERSION="8.4"
ARG GLOBAL_VERSION="v5"
ARG REPO="thecodingmachine/php"
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.fpm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)
ARG INSTALL_CRON=1
ARG INSTALL_COMPOSER=1
ARG INSTALL_LOCALES=1
ARG PHP_VERSION="8.4"
ARG GLOBAL_VERSION="v5"
ARG REPO="thecodingmachine/php"
Expand Down
33 changes: 33 additions & 0 deletions Dockerfile.slim.apache
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini

RUN curl -sS --retry 5 --retry-delay 2 https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer &&\
chmod +x /usr/local/bin/composer
COPY utils/select_composer_version.sh /usr/local/bin/select_composer_version.sh

# TODO: utils.php in /usr/local/bin... bof!
COPY utils/utils.php /usr/local/bin/utils.php
Expand Down Expand Up @@ -223,6 +224,13 @@ ENV APACHE_DOCUMENT_ROOT=
RUN sed -ri -e 's!/var/www/html!${ABSOLUTE_APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
sed -ri -e 's!/var/www/!${ABSOLUTE_APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

ENV APACHE_HTTP_PORT=80 \
APACHE_HTTPS_PORT=443

RUN sed -ri -e 's/^Listen 80$/Listen ${APACHE_HTTP_PORT}/' -e 's/^(\s*)Listen 443$/\1Listen ${APACHE_HTTPS_PORT}/' /etc/apache2/ports.conf && \
sed -i 's/<VirtualHost \*:80>/<VirtualHost *:${APACHE_HTTP_PORT}>/' /etc/apache2/sites-available/000-default.conf && \
sed -i 's/<VirtualHost \*:443>/<VirtualHost *:${APACHE_HTTPS_PORT}>/' /etc/apache2/sites-available/default-ssl.conf

# Let's remove the default Apache php.ini file (it will be copied from TEMPLATE_PHP_INI)
RUN rm /etc/php/${PHP_VERSION}/apache2/php.ini

Expand Down Expand Up @@ -322,6 +330,7 @@ COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh

COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh
COPY utils/supervise.sh /usr/local/bin/supervise.sh

COPY extensions/ /usr/local/lib/thecodingmachine-php/extensions
RUN ln -s ${PHP_VERSION} /usr/local/lib/thecodingmachine-php/extensions/current
Expand Down Expand Up @@ -388,6 +397,30 @@ ONBUILD RUN if [ -n "$INSTALL_CRON" ]; then \
&& sudo ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic; \
fi

# |--------------------------------------------------------------------------
# | Composer version
# |--------------------------------------------------------------------------
# |
# | Installs the Composer version COMPOSER_VERSION instead of the latest one.
# |
ONBUILD ARG COMPOSER_VERSION
ONBUILD RUN if [ -n "$COMPOSER_VERSION" ]; then \
sudo /usr/local/bin/select_composer_version.sh "$COMPOSER_VERSION"; \
fi

# |--------------------------------------------------------------------------
# | Locales
# |--------------------------------------------------------------------------
# |
# | Installs the tools generating the locales listed in LOCALES at the container start.
# |
ONBUILD ARG INSTALL_LOCALES
ONBUILD RUN if [ -n "$INSTALL_LOCALES" ]; then \
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends locales \
&& sudo apt-get clean \
&& sudo rm -rf /var/lib/apt/lists/* /var/cache/apt/*.bin /tmp/* /var/tmp/* /usr/share/doc/*; \
fi

# |--------------------------------------------------------------------------
# | NodeJS
Expand Down
26 changes: 26 additions & 0 deletions Dockerfile.slim.cli
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini

RUN curl -sS --retry 5 --retry-delay 2 https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer &&\
chmod +x /usr/local/bin/composer
COPY utils/select_composer_version.sh /usr/local/bin/select_composer_version.sh

# TODO: utils.php in /usr/local/bin... bof!
COPY utils/utils.php /usr/local/bin/utils.php
Expand Down Expand Up @@ -245,6 +246,7 @@ COPY utils/startup_commands.php /usr/local/bin/startup_commands.php

COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh
COPY utils/supervise.sh /usr/local/bin/supervise.sh

COPY extensions/ /usr/local/lib/thecodingmachine-php/extensions
RUN ln -s ${PHP_VERSION} /usr/local/lib/thecodingmachine-php/extensions/current
Expand Down Expand Up @@ -293,6 +295,30 @@ ONBUILD RUN if [ -n "$INSTALL_CRON" ]; then \
&& sudo ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic; \
fi

# |--------------------------------------------------------------------------
# | Composer version
# |--------------------------------------------------------------------------
# |
# | Installs the Composer version COMPOSER_VERSION instead of the latest one.
# |
ONBUILD ARG COMPOSER_VERSION
ONBUILD RUN if [ -n "$COMPOSER_VERSION" ]; then \
sudo /usr/local/bin/select_composer_version.sh "$COMPOSER_VERSION"; \
fi

# |--------------------------------------------------------------------------
# | Locales
# |--------------------------------------------------------------------------
# |
# | Installs the tools generating the locales listed in LOCALES at the container start.
# |
ONBUILD ARG INSTALL_LOCALES
ONBUILD RUN if [ -n "$INSTALL_LOCALES" ]; then \
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends locales \
&& sudo apt-get clean \
&& sudo rm -rf /var/lib/apt/lists/* /var/cache/apt/*.bin /tmp/* /var/tmp/* /usr/share/doc/*; \
fi

# |--------------------------------------------------------------------------
# | NodeJS
Expand Down
26 changes: 26 additions & 0 deletions Dockerfile.slim.fpm
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini

RUN curl -sS --retry 5 --retry-delay 2 https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer &&\
chmod +x /usr/local/bin/composer
COPY utils/select_composer_version.sh /usr/local/bin/select_composer_version.sh

# TODO: utils.php in /usr/local/bin... bof!
COPY utils/utils.php /usr/local/bin/utils.php
Expand Down Expand Up @@ -262,6 +263,7 @@ COPY utils/startup_commands.php /usr/local/bin/startup_commands.php

COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh
COPY utils/supervise.sh /usr/local/bin/supervise.sh

COPY extensions/ /usr/local/lib/thecodingmachine-php/extensions
RUN ln -s ${PHP_VERSION} /usr/local/lib/thecodingmachine-php/extensions/current
Expand Down Expand Up @@ -316,6 +318,30 @@ ONBUILD RUN if [ -n "$INSTALL_CRON" ]; then \
&& sudo ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic; \
fi

# |--------------------------------------------------------------------------
# | Composer version
# |--------------------------------------------------------------------------
# |
# | Installs the Composer version COMPOSER_VERSION instead of the latest one.
# |
ONBUILD ARG COMPOSER_VERSION
ONBUILD RUN if [ -n "$COMPOSER_VERSION" ]; then \
sudo /usr/local/bin/select_composer_version.sh "$COMPOSER_VERSION"; \
fi

# |--------------------------------------------------------------------------
# | Locales
# |--------------------------------------------------------------------------
# |
# | Installs the tools generating the locales listed in LOCALES at the container start.
# |
ONBUILD ARG INSTALL_LOCALES
ONBUILD RUN if [ -n "$INSTALL_LOCALES" ]; then \
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends locales \
&& sudo apt-get clean \
&& sudo rm -rf /var/lib/apt/lists/* /var/cache/apt/*.bin /tmp/* /var/tmp/* /usr/share/doc/*; \
fi

# |--------------------------------------------------------------------------
# | NodeJS
Expand Down
Loading