Skip to content

Latest commit

History

96 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Base Images

  • Base Image
  • PHP
  • Magento

Build everything:

# Fundimentally, this is all it takes:
docker buildx bake --provenance=false --push --progress=plain
# But we have some test wrappers to automatically test and push
./test && ./bake

Architecture of the Containers

Architecture

Based on runit. It runs multiple processes internally, and monitors them. In the /etc/services.d/ directory you'll find the following services at time of writing:

  • alpine-*-base: Base image
    • /etc/services.d/logs/: Log service, which collects logs from the other services and writes them to files.
      • Setting the envvar LOG_PATHS to a space-seperated list of paths will make the log service collect logs from those paths and write them to stdout.
    • /etc/services.d/splash/: Splash service, which is a simple web server that serves the splash page.
    • /etc/services.d/cron/: Cron service.
  • php-*-base: PHP flavoured base image
    • /etc/services.d/nginx/: Nginx service.
    • /etc/services.d/php/: PHP-FPM service, which runs the PHP application itself.
  • php-*-node-base: PHP flavoured base image with Node.js support
    • /etc/services.d/npm-babysitter/: Monitors permissions on the node cache directories and fixes them if they change.
    • /etc/services.d/npm-watcher/:
      • Similar to the logs service, setting the envvar NPM_WATCH_PATHS will make the npm watcher run npm run watch in those paths.
      • [ WARNING ]: This is currently busted.
  • magento-*-base: Magento flavoured base image
    • /etc/services.d/magento/: Magento service, which runs the Magento application.
      • Fixes cache permissions, and runs any scripts loaded into /etc/services.d/magento/tasks.d/ to get your Magento application going and touches /etc/services.d/magento/done upon completion.
  • java-*-base: Java flavoured base image
  • java-war-machine-*-base: Java War Machine flavoured base image
    • /etc/services.d/java/: Java service runner, which runs any .war files placed into /app

Each directory contains a run script that starts the service. The run script is executed by runit when the container starts. If the run script exits, runit will restart it, unless there is a finish script. The finish script will get the exit code of run as its $1 argument. The finish script can decide to sleep forever or exit to restart the service. More can be read in the runit documentation particularly runsv and runsvdir

Configurable Options

Environment VariableAffected ImagesDefaultOptionsDescription
MAGENTO_MODEmagentodeveloperdeveloper or productionThe mode in which Magento will run.
NPM_WATCH_PATHSphp-node+""Space seperated paths.Paths to watch for changes. The paths to watch for changes using npm run watch in the application.
PHP_MEMORY_LIMITphp+256M256M, 2G etcThe memory limit for PHP scripts.
PHP_CLI_MEMORY_LIMITphp+4G256M, 2G etcThe memory limit for PHP CLI scripts.
PHP_DEBUG_MODEphp+nullonEnable or disable debug mode.
PHP_ERROR_REPORTINGphp+E_ALL if PHP_DEBUG_MODE is on. E_ERROR otherwise.Expressions from error_reportingoverride error_reporting level.
PHP_DISPLAY_ERRORSphp+on when PHP_DEBUG_MODE is on. off otherwiseon or offEnable or disable display errors.
PHP_ENABLE_XDEBUGphp+nullon or offEnable or disable Xdebug. Is influenced by PHP_ERROR_REPORTING.
WAR_FILEjava-war-machinenullPath to a .war file.An explicit path to the .war file to run. Will be autodetected if not present. Only neccisary if executable name is ambiguous.
NTP_SERVERbase+0.pool.ntp.orgAny valid NTP server addressThe NTP server to use for time synchronization.
LOG_PATHSbase+``, overridden by php base image etc.Space seperated paths.Paths to collect logs from. The paths of files to collect logs from and write them to stdout.

Versions available

ContainerIs :latestVersionAlpineTag
MagentoPHP 8.4, Node 22Alpine 3.22ghcr.io/roushtech/docker/magento:8.4
Magento✔️PHP 8.1, Node 18Alpine 3.18ghcr.io/roushtech/docker/magento:8.1
PHP+Node✔️️PHP 8.5, Node 24Alpine 3.23ghcr.io/roushtech/docker/php-node:8.5
PHP+NodePHP 8.4, Node 22Alpine 3.22ghcr.io/roushtech/docker/php-node:8.4
PHP+NodePHP 8.3, Node 22Alpine 3.22ghcr.io/roushtech/docker/php-node:8.3
PHP+NodePHP 8.2, Node 22Alpine 3.21ghcr.io/roushtech/docker/php-node:8.2
PHP+NodePHP 8.1, Node 18Alpine 3.18ghcr.io/roushtech/docker/php-node:8.1
PHP+NodePHP 7.4, Node 16Alpine 3.15ghcr.io/roushtech/docker/php-node:7.4
PHP✔️PHP 8.5Alpine 3.23ghcr.io/roushtech/docker/php:8.5
PHPPHP 8.4Alpine 3.21ghcr.io/roushtech/docker/php:8.4
PHPPHP 8.3Alpine 3.22ghcr.io/roushtech/docker/php:8.3
PHPPHP 8.2Alpine 3.21ghcr.io/roushtech/docker/php:8.2
PHPPHP 8.1Alpine 3.18ghcr.io/roushtech/docker/php:8.1
PHPPHP 7.4Alpine 3.15ghcr.io/roushtech/docker/php:7.4
Node✔️Node 24Alpine 3.23ghcr.io/roushtech/docker/node:24
NodeNode 22Alpine 3.21ghcr.io/roushtech/docker/node:22
Java✔️OpenJDK 21Alpine 3.22ghcr.io/roushtech/docker/java:21
JavaOpenJDK 17Alpine 3.22ghcr.io/roushtech/docker/java:17
JavaOpenJDK 11Alpine 3.22ghcr.io/roushtech/docker/java:11
JavaOpenJDK 8Alpine 3.22ghcr.io/roushtech/docker/java:8
Java War MachineOpenJDK 21Alpine 3.22ghcr.io/roushtech/docker/java:war-machine-21
Java War MachineOpenJDK 17Alpine 3.22ghcr.io/roushtech/docker/java:war-machine-17
Java War MachineOpenJDK 11Alpine 3.22ghcr.io/roushtech/docker/java:war-machine-11
.Net✔️.Net 10Alpine 3.23ghcr.io/roushtech/docker/dotnet:10
.Net.Net 9Alpine 3.23ghcr.io/roushtech/docker/dotnet:9
Base3.23Alpine 3.23ghcr.io/roushtech/docker/base:3.23
Base3.22Alpine 3.21ghcr.io/roushtech/docker/base:3.22
Base3.21Alpine 3.21ghcr.io/roushtech/docker/base:3.21
Base3.18Alpine 3.18ghcr.io/roushtech/docker/base:3.18
Base3.15Alpine 3.15ghcr.io/roushtech/docker/base:3.15

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages