Debian based development image with Apache, several PHP versions, MariaDB, Composer, Node.js and
common CLI tools. It is the base of the netinventors/shopware and netinventors/typo3 images.
| Tag | Content |
|---|---|
latest, <version>, <version>-apache | All PHP versions (7.3 – 8.5), PHP 8.4 is the default |
<version>-php<X.Y>, <version>-apache-php<X.Y> | Only PHP <X.Y> (smaller image), e.g. 1.5.0-php8.4 |
The versions below refer to image version 1.5.0.
ENABLE_XDEBUG)n 11.0.0)bat alias for the web user)| Port | Service |
|---|---|
| 22 | SSH |
| 80 | HTTP |
| 443 | HTTPS (self-signed certificate for localhost) |
| 3306 | MariaDB |
The container health check requests http://127.0.0.1/ping.
All described environment variables are displayed with their default values.
| Variable name | Default value |
|---|---|
| TZ | Europe/Berlin |
The web user is created at the first container start. The user belongs to the group www-data,
runs Apache and can log in via SSH.
| Variable name | Default value |
|---|---|
| WEB_USER_UID | 1000 |
| WEB_USER_USERNAME | "netinventors" |
| WEB_USER_PASSWORD | "athene" |
At each start the ownership and permissions of the cache, log and backup directories are fixed.
| Variable name | Default value | Possible values | Description |
|---|---|---|---|
| SKIP_PERMISSION_FIXER | "false" |
| Skips the permission fixer completely |
| SKIP_HTML_PERMISSION_FIXER | "true" |
| Skips the ownership fix of /var/www/html |
The currently available PHP versions are:
The tags with a -php<X.Y> suffix only contain one PHP version, which is also the default value of PHP_VERSION.
| Variable name | Default value | Possible values |
|---|---|---|
| PHP_INI_SCAN_DIR | ":/usr/local/etc/php/cli/conf.d" | |
| APACHE_PHP_INI_SCAN_DIR | ":/usr/local/etc/php/apache2/conf.d" | |
| PHP_VERSION | 8.4 |
|
| ENABLE_XDEBUG | "true" |
|
The leading : keeps the default scan directory of the PHP version and adds the given directory.
| Variable name | Default value | Possible values |
|---|---|---|
| COMPOSER_HOME | /usr/local/share/composer | |
| COMPOSER_VERSION | 2 |
|
| UPDATE_COMPOSER | "false" |
|
Both versions are available as composer-1 and composer-2, composer links to the selected one.
| Variable name | Default value | Possible values |
|---|---|---|
| NODE_VERSION | 24.22.2 | |
| NPM_VERSION | 11.19.1 | |
| UPDATE_NODE | "false" |
|
| UPDATE_NPM | "false" |
|
| UPDATE_N | "false" |
|
If NODE_VERSION or NPM_VERSION differs from the preinstalled version, the requested version is installed at
container start (internet access required). NODE_VERSION accepts every version n understands, e.g. 22 or lts.
The value -1 skips the installation.
If MYSQL_HOST is localhost or 127.0.0.1 a local MariaDB server instance will be started automatically.
The variables are used by the snapshot commands and the derived images. The base image itself does not
create the user or the database.
| Variable name | Default value |
|---|---|
| MYSQL_HOST | "localhost" |
| MYSQL_PORT | "3306" |
| MYSQL_USER | "netinventors" |
| MYSQL_PASSWORD | "athene" |
| MYSQL_DATABASE | "app" |
| Location | Description |
|---|---|
| /var/www/html | Document root (HTTP and HTTPS) |
| /usr/local/share/composer | Composer home and cache directory |
| /usr/local/etc/php/apache2/conf.d | Additional loaded PHP configuring *.ini files for the Apache |
| /usr/local/etc/php/cli/conf.d | Additional loaded PHP configuring *.ini files for the CLI |
| /usr/local/etc/boot.d | Shell scripts (*.sh) executed in sorted order at container start |
| /usr/local/etc/supervisor/conf.d | Additional supervisor program configurations (*.conf) |
| /usr/local/share/permission-fixer | Shell scripts (*.sh) fixing permissions at container start |
| /usr/local/share/certs | CA (ca.pem, trusted in the container) and localhost certificate |
| /usr/local/var/log | Directory where all the logs go to (apache2, mysql, supervisor) |
| /usr/local/var/backup | Directory storing created snapshots |
The log directory is linked as ~/log into the home directory of the web user.
The ImageMagick policy limits the resources (memory 256 MiB, map 512 MiB, disk 1 GiB, max. 16K × 16K pixels) and disables URL delegates as well as the PS, EPS and XPS coders. PDF can be read and written.
Some mapped volumes will now locate in different places.
| Old location | New location |
|---|---|
| /certs | No longer required |
| /etc/ssl/openssl.cnf | No longer required |
| /etc/apache2/sites-enabled | No longer required |
| /home/netinventors/.composer | /usr/local/share/composer |
| /usr/local/etc/php/conf.d | /usr/local/etc/php/cli/conf.d |
| /var/log/app | /usr/local/var/log |
You can run different commands directly via task.
Executing task without an argument is an alias for task --list and shows the available commands.
The snapshot commands are provided as /usr/local/share/skel.d/taskfile/Snapshot.yml and are included
by the Taskfiles of the derived images.
| Command | Description |
|---|---|
| snapshot:list | Lists available snapshots |
| snapshot:create | Creates a snapshot Example: task snapshot:create -- "Comment" |
| snapshot:restore | Restores a snapshot Example: task snapshot:restore -- "810511133700" |
| snapshot:restore:files | Restores a snapshots files Example: task snapshot:restore:files -- "810511133700" |
| snapshot:restore:database | Restores a snapshots database Example: task snapshot:restore:database -- "810511133700" |
| snapshot:remove | Removes a snapshot Example: task snapshot:remove -- "810511133700" |
| snapshot:purge | Purges all snapshots |
Content type
Image
Digest
sha256:7639a125a…
Size
545.5 MB
Last updated
3 days ago
docker pull netinventors/php-base