├── redis ├── redis-5.0 │ └── Dockerfile └── redis-5-alpine │ └── Dockerfile ├── mariadb └── mariadb-10.5 │ └── Dockerfile ├── mysql └── mysql-8 │ └── Dockerfile ├── postgres ├── postgres-12.2 │ └── Dockerfile └── postgres-12-alpine │ └── Dockerfile ├── README.md ├── nginx ├── nginx-1.18 │ ├── Dockerfile │ └── default.conf └── nginx-1.19-alpine │ ├── Dockerfile │ └── default.conf ├── php-prod-base ├── php-7.3 │ ├── zzz-docker-php-fpm.conf │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-7.4 │ ├── zzz-docker-php-fpm.conf │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-7.4-alpine │ ├── zzz-docker-php-fpm.conf │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-8.0-alpine │ ├── zzz-docker-php-fpm.conf │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-8.1-alpine │ ├── zzz-docker-php-fpm.conf │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-8.2-alpine │ ├── zzz-docker-php-fpm.conf │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-8.3-alpine │ ├── zzz-docker-php-fpm.conf │ ├── zzz-docker-php.ini │ └── Dockerfile └── php-8.4-alpine │ ├── zzz-docker-php-fpm.conf │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-dev-base ├── php-8.0-alpine │ ├── zzz-docker-php-fpm.conf │ ├── xdebug.ini │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-8.1-alpine │ ├── zzz-docker-php-fpm.conf │ ├── xdebug.ini │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-8.2-alpine │ ├── zzz-docker-php-fpm.conf │ ├── xdebug.ini │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-8.3-alpine │ ├── zzz-docker-php-fpm.conf │ ├── xdebug.ini │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-8.4-alpine │ ├── zzz-docker-php-fpm.conf │ ├── xdebug.ini │ ├── zzz-docker-php.ini │ └── Dockerfile ├── php-7.3 │ ├── xdebug.ini │ └── Dockerfile ├── php-7.4 │ ├── xdebug.ini │ └── Dockerfile └── php-7.4-alpine │ ├── xdebug.ini │ └── Dockerfile ├── expo-dev-base └── node-14 │ ├── entrypoint.sh │ └── Dockerfile ├── .gitignore ├── php-prod-craft ├── php-7.3 │ ├── mariadb │ │ ├── run_queue.sh │ │ └── Dockerfile │ └── postgres │ │ ├── run_queue.sh │ │ └── Dockerfile ├── php-7.4 │ ├── mariadb │ │ ├── run_queue.sh │ │ └── Dockerfile │ └── postgres │ │ ├── run_queue.sh │ │ └── Dockerfile ├── php-7.4-alpine │ ├── mariadb │ │ ├── run_queue.sh │ │ └── Dockerfile │ └── postgres │ │ ├── run_queue.sh │ │ └── Dockerfile └── php-8.0-alpine │ ├── mariadb │ ├── run_queue.sh │ └── Dockerfile │ └── postgres │ ├── run_queue.sh │ └── Dockerfile ├── node-dev-webpack ├── node-11 │ └── Dockerfile ├── node-12 │ └── Dockerfile └── node-12-alpine │ └── Dockerfile ├── LICENSE ├── php-dev-craft ├── php-7.3 │ ├── mariadb │ │ └── Dockerfile │ └── postgres │ │ └── Dockerfile ├── php-7.4 │ ├── mariadb │ │ └── Dockerfile │ └── postgres │ │ └── Dockerfile ├── php-7.4-alpine │ ├── mariadb │ │ └── Dockerfile │ └── postgres │ │ └── Dockerfile └── php-8.0-alpine │ ├── mariadb │ └── Dockerfile │ └── postgres │ └── Dockerfile ├── Makefile ├── node-dev-base ├── node-11 │ └── Dockerfile ├── node-12 │ └── Dockerfile ├── node-18-alpine │ └── Dockerfile ├── node-12-alpine │ └── Dockerfile ├── node-14-alpine │ └── Dockerfile ├── node-16-alpine │ └── Dockerfile ├── node-20-alpine │ └── Dockerfile └── node-22-alpine │ └── Dockerfile ├── .github └── workflows │ ├── build-and-push-docker-images.yml │ └── build-docker-images.yml ├── docker-compose ├── craft-postgres │ └── docker-compose.yml ├── craft-mysql │ └── docker-compose.yml └── craft-mariadb │ └── docker-compose.yml └── CHANGELOG.md /redis/redis-5.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM redis:5.0 2 | -------------------------------------------------------------------------------- /mariadb/mariadb-10.5/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mariadb:10.5 2 | -------------------------------------------------------------------------------- /mysql/mysql-8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mysql/mysql-server:8.0 2 | -------------------------------------------------------------------------------- /postgres/postgres-12.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:12.2 2 | -------------------------------------------------------------------------------- /redis/redis-5-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM redis:5-alpine 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-images 2 | Docker image source files 3 | -------------------------------------------------------------------------------- /postgres/postgres-12-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:12-alpine 2 | -------------------------------------------------------------------------------- /nginx/nginx-1.18/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.18 2 | 3 | COPY ./default.conf /etc/nginx/conf.d/default.conf 4 | -------------------------------------------------------------------------------- /nginx/nginx-1.19-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.19-alpine 2 | 3 | COPY ./default.conf /etc/nginx/conf.d/default.conf 4 | -------------------------------------------------------------------------------- /php-prod-base/php-7.3/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 10 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-prod-base/php-7.4/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 10 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.0-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 5 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.1-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 5 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.2-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 5 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.3-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 5 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.4-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 5 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-prod-base/php-7.4-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 10 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-prod-base/php-8.0-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 10 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-prod-base/php-8.1-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 10 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-prod-base/php-8.2-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 10 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-prod-base/php-8.3-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 10 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-prod-base/php-8.4-alpine/zzz-docker-php-fpm.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | pm.max_children = 10 3 | pm.process_idle_timeout = 30s 4 | pm.max_requests = 1000 5 | -------------------------------------------------------------------------------- /php-dev-base/php-7.3/xdebug.ini: -------------------------------------------------------------------------------- 1 | xdebug.default_enable=1 2 | xdebug.remote_enable=1 3 | xdebug.remote_port=9003 4 | xdebug.remote_handler=dbgp 5 | xdebug.remote_host=host.docker.internal 6 | xdebug.remote_autostart=1 7 | -------------------------------------------------------------------------------- /php-dev-base/php-7.4/xdebug.ini: -------------------------------------------------------------------------------- 1 | xdebug.default_enable=1 2 | xdebug.remote_enable=1 3 | xdebug.remote_port=9003 4 | xdebug.remote_handler=dbgp 5 | xdebug.remote_host=host.docker.internal 6 | xdebug.remote_autostart=1 7 | -------------------------------------------------------------------------------- /php-dev-base/php-8.0-alpine/xdebug.ini: -------------------------------------------------------------------------------- 1 | xdebug.mode=develop,debug,profile,coverage 2 | xdebug.start_with_request=trigger 3 | xdebug.client_host=host.docker.internal 4 | xdebug.output_dir = "/var/www/project/cms/storage/logs" 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.1-alpine/xdebug.ini: -------------------------------------------------------------------------------- 1 | xdebug.mode=develop,debug,profile,coverage 2 | xdebug.start_with_request=trigger 3 | xdebug.client_host=host.docker.internal 4 | xdebug.output_dir = "/var/www/project/cms/storage/logs" 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.2-alpine/xdebug.ini: -------------------------------------------------------------------------------- 1 | xdebug.mode=develop,debug,profile,coverage 2 | xdebug.start_with_request=trigger 3 | xdebug.client_host=host.docker.internal 4 | xdebug.output_dir = "/var/www/project/cms/storage/logs" 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.3-alpine/xdebug.ini: -------------------------------------------------------------------------------- 1 | xdebug.mode=develop,debug,profile,coverage 2 | xdebug.start_with_request=trigger 3 | xdebug.client_host=host.docker.internal 4 | xdebug.output_dir = "/var/www/project/cms/storage/logs" 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.4-alpine/xdebug.ini: -------------------------------------------------------------------------------- 1 | xdebug.mode=develop,debug,profile,coverage 2 | xdebug.start_with_request=trigger 3 | xdebug.client_host=host.docker.internal 4 | xdebug.output_dir = "/var/www/project/cms/storage/logs" 5 | -------------------------------------------------------------------------------- /php-dev-base/php-8.0-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=0 10 | -------------------------------------------------------------------------------- /php-dev-base/php-8.1-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=0 10 | -------------------------------------------------------------------------------- /php-dev-base/php-8.2-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=0 10 | -------------------------------------------------------------------------------- /php-dev-base/php-8.3-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=0 10 | -------------------------------------------------------------------------------- /php-dev-base/php-8.4-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=0 10 | -------------------------------------------------------------------------------- /expo-dev-base/node-14/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # https://github.com/nodejs/docker-node/blob/master/10/alpine/docker-entrypoint.sh 5 | if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then 6 | set -- expo "$@" 7 | fi 8 | 9 | exec "$@" 10 | -------------------------------------------------------------------------------- /php-prod-base/php-7.3/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=1 10 | opcache.revalidate_freq=0 11 | opcache.validate_timestamps=1 12 | -------------------------------------------------------------------------------- /php-prod-base/php-7.4/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=1 10 | opcache.revalidate_freq=0 11 | opcache.validate_timestamps=1 12 | -------------------------------------------------------------------------------- /php-prod-base/php-7.4-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=1 10 | opcache.revalidate_freq=0 11 | opcache.validate_timestamps=1 12 | -------------------------------------------------------------------------------- /php-dev-base/php-7.4-alpine/xdebug.ini: -------------------------------------------------------------------------------- 1 | xdebug.default_enable=1 2 | xdebug.remote_enable=1 3 | xdebug.remote_port=9003 4 | xdebug.remote_handler=dbgp 5 | xdebug.remote_host=host.docker.internal 6 | xdebug.remote_autostart=1 7 | xdebug.profiler_enable = 0; 8 | xdebug.profiler_enable_trigger = 1; 9 | xdebug.profiler_output_dir = "/var/www/project/cms/storage/logs" 10 | -------------------------------------------------------------------------------- /php-prod-base/php-8.0-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=1 10 | opcache.revalidate_freq=0 11 | opcache.validate_timestamps=1 12 | opcache.jit_buffer_size=100M 13 | opcache.jit=tracing 14 | -------------------------------------------------------------------------------- /php-prod-base/php-8.1-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=1 10 | opcache.revalidate_freq=0 11 | opcache.validate_timestamps=1 12 | opcache.jit_buffer_size=100M 13 | opcache.jit=tracing 14 | -------------------------------------------------------------------------------- /php-prod-base/php-8.2-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=1 10 | opcache.revalidate_freq=0 11 | opcache.validate_timestamps=1 12 | opcache.jit_buffer_size=100M 13 | opcache.jit=tracing 14 | -------------------------------------------------------------------------------- /php-prod-base/php-8.3-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=1 10 | opcache.revalidate_freq=0 11 | opcache.validate_timestamps=1 12 | opcache.jit_buffer_size=100M 13 | opcache.jit=tracing 14 | -------------------------------------------------------------------------------- /php-prod-base/php-8.4-alpine/zzz-docker-php.ini: -------------------------------------------------------------------------------- 1 | [php] 2 | memory_limit=256M 3 | max_execution_time=300 4 | max_input_time=300 5 | max_input_vars=5000 6 | upload_max_filesize=100M 7 | post_max_size=100M 8 | [opcache] 9 | opcache.enable=1 10 | opcache.revalidate_freq=0 11 | opcache.validate_timestamps=1 12 | opcache.jit_buffer_size=100M 13 | opcache.jit=tracing 14 | -------------------------------------------------------------------------------- /expo-dev-base/node-14/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14-alpine 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | bash \ 9 | git \ 10 | && \ 11 | npm install --global --unsafe-perm \ 12 | expo-cli \ 13 | && \ 14 | npm cache clean --force 15 | 16 | COPY entrypoint.sh / 17 | 18 | ENTRYPOINT ["/entrypoint.sh"] 19 | CMD ["--help"] 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ENVIRONMENT 2 | .env* 3 | 4 | # COMPOSER 5 | */vendor/* 6 | 7 | # BUILD FILES 8 | node_modules 9 | yarn-error.log 10 | npm-debug.log 11 | 12 | # MISC FILES 13 | .cache 14 | .DS_Store 15 | .idea 16 | .project 17 | .settings 18 | *.esproj 19 | *.sublime-workspace 20 | *.sublime-project 21 | *.tmproj 22 | *.tmproject 23 | .vscode/* 24 | !.vscode/settings.json 25 | !.vscode/tasks.json 26 | !.vscode/launch.json 27 | !.vscode/extensions.json 28 | config.codekit3 29 | prepros-6.config 30 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.3/mariadb/run_queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run Queue shell script 4 | # 5 | # This shell script runs the Craft CMS queue via `php craft queue/listen` 6 | # It's wrapped in a "keep alive" infinite loop that restarts the command 7 | # (after a 30 second sleep) should it exit unexpectedly for any reason 8 | # 9 | # @author nystudio107 10 | # @copyright Copyright (c) 2020 nystudio107 11 | # @link https://nystudio107.com/ 12 | # @license MIT 13 | 14 | while true 15 | do 16 | cd /var/www/project/cms 17 | php craft queue/listen 10 18 | echo "-> craft queue/listen will retry in 30 seconds" 19 | sleep 30 20 | done 21 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.3/postgres/run_queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run Queue shell script 4 | # 5 | # This shell script runs the Craft CMS queue via `php craft queue/listen` 6 | # It's wrapped in a "keep alive" infinite loop that restarts the command 7 | # (after a 30 second sleep) should it exit unexpectedly for any reason 8 | # 9 | # @author nystudio107 10 | # @copyright Copyright (c) 2020 nystudio107 11 | # @link https://nystudio107.com/ 12 | # @license MIT 13 | 14 | while true 15 | do 16 | cd /var/www/project/cms 17 | php craft queue/listen 10 18 | echo "-> craft queue/listen will retry in 30 seconds" 19 | sleep 30 20 | done 21 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.4/mariadb/run_queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run Queue shell script 4 | # 5 | # This shell script runs the Craft CMS queue via `php craft queue/listen` 6 | # It's wrapped in a "keep alive" infinite loop that restarts the command 7 | # (after a 30 second sleep) should it exit unexpectedly for any reason 8 | # 9 | # @author nystudio107 10 | # @copyright Copyright (c) 2020 nystudio107 11 | # @link https://nystudio107.com/ 12 | # @license MIT 13 | 14 | while true 15 | do 16 | cd /var/www/project/cms 17 | php craft queue/listen 10 18 | echo "-> craft queue/listen will retry in 30 seconds" 19 | sleep 30 20 | done 21 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.4/postgres/run_queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run Queue shell script 4 | # 5 | # This shell script runs the Craft CMS queue via `php craft queue/listen` 6 | # It's wrapped in a "keep alive" infinite loop that restarts the command 7 | # (after a 30 second sleep) should it exit unexpectedly for any reason 8 | # 9 | # @author nystudio107 10 | # @copyright Copyright (c) 2020 nystudio107 11 | # @link https://nystudio107.com/ 12 | # @license MIT 13 | 14 | while true 15 | do 16 | cd /var/www/project/cms 17 | php craft queue/listen 10 18 | echo "-> craft queue/listen will retry in 30 seconds" 19 | sleep 30 20 | done 21 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.4-alpine/mariadb/run_queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run Queue shell script 4 | # 5 | # This shell script runs the Craft CMS queue via `php craft queue/listen` 6 | # It's wrapped in a "keep alive" infinite loop that restarts the command 7 | # (after a 60 second sleep) should it exit unexpectedly for any reason 8 | # 9 | # @author nystudio107 10 | # @copyright Copyright (c) 2020 nystudio107 11 | # @link https://nystudio107.com/ 12 | # @license MIT 13 | 14 | while true 15 | do 16 | cd /var/www/project/cms 17 | su-exec www-data php craft queue/listen 10 18 | echo "-> craft queue/listen will retry in 60 seconds" 19 | sleep 60 20 | done 21 | -------------------------------------------------------------------------------- /php-prod-craft/php-8.0-alpine/mariadb/run_queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run Queue shell script 4 | # 5 | # This shell script runs the Craft CMS queue via `php craft queue/listen` 6 | # It's wrapped in a "keep alive" infinite loop that restarts the command 7 | # (after a 60 second sleep) should it exit unexpectedly for any reason 8 | # 9 | # @author nystudio107 10 | # @copyright Copyright (c) 2020 nystudio107 11 | # @link https://nystudio107.com/ 12 | # @license MIT 13 | 14 | while true 15 | do 16 | cd /var/www/project/cms 17 | su-exec www-data php craft queue/listen 10 18 | echo "-> craft queue/listen will retry in 60 seconds" 19 | sleep 60 20 | done 21 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.4-alpine/postgres/run_queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run Queue shell script 4 | # 5 | # This shell script runs the Craft CMS queue via `php craft queue/listen` 6 | # It's wrapped in a "keep alive" infinite loop that restarts the command 7 | # (after a 60 second sleep) should it exit unexpectedly for any reason 8 | # 9 | # @author nystudio107 10 | # @copyright Copyright (c) 2020 nystudio107 11 | # @link https://nystudio107.com/ 12 | # @license MIT 13 | 14 | while true 15 | do 16 | cd /var/www/project/cms 17 | su-exec www-data php craft queue/listen 10 18 | echo "-> craft queue/listen will retry in 60 seconds" 19 | sleep 60 20 | done 21 | -------------------------------------------------------------------------------- /php-prod-craft/php-8.0-alpine/postgres/run_queue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run Queue shell script 4 | # 5 | # This shell script runs the Craft CMS queue via `php craft queue/listen` 6 | # It's wrapped in a "keep alive" infinite loop that restarts the command 7 | # (after a 60 second sleep) should it exit unexpectedly for any reason 8 | # 9 | # @author nystudio107 10 | # @copyright Copyright (c) 2020 nystudio107 11 | # @link https://nystudio107.com/ 12 | # @license MIT 13 | 14 | while true 15 | do 16 | cd /var/www/project/cms 17 | su-exec www-data php craft queue/listen 10 18 | echo "-> craft queue/listen will retry in 60 seconds" 19 | sleep 60 20 | done 21 | -------------------------------------------------------------------------------- /php-dev-base/php-7.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.3 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # pecl PHP extensions 7 | pecl install \ 8 | xdebug-2.8.1 \ 9 | && \ 10 | # Enable PHP extensions 11 | docker-php-ext-enable \ 12 | xdebug \ 13 | # Clean apt repo caches that don't need to be part of the image 14 | && \ 15 | apt-get clean \ 16 | && \ 17 | # Clean out directories that don't need to be part of the image 18 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 19 | 20 | # Copy the `xdebug.ini` file into place for xdebug 21 | COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 22 | -------------------------------------------------------------------------------- /php-dev-base/php-7.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.4 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # pecl PHP extensions 7 | pecl install \ 8 | xdebug-2.9.8 \ 9 | && \ 10 | # Enable PHP extensions 11 | docker-php-ext-enable \ 12 | xdebug \ 13 | # Clean apt repo caches that don't need to be part of the image 14 | && \ 15 | apt-get clean \ 16 | && \ 17 | # Clean out directories that don't need to be part of the image 18 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 19 | 20 | # Copy the `xdebug.ini` file into place for xdebug 21 | COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 22 | -------------------------------------------------------------------------------- /node-dev-webpack/node-11/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/node-dev-base:11 2 | 3 | WORKDIR /var/www/project/buildchain/ 4 | 5 | # Run our webpack build in debug mode 6 | 7 | # We'd normally use `npm ci` here, but by using `install`: 8 | # - If `package-lock.json` is present, it will install what is in the lock file 9 | # - If `package-lock.json` is missing, it will update to the latest dependencies 10 | # and create the `package-lock-json` file 11 | # This automatic running adds to the startup overhead of `docker-compose up` 12 | # but saves far more time in not having to deal with out of sync versions 13 | # when working with teams or multiple environments 14 | CMD npm install \ 15 | && \ 16 | npm run debug 17 | -------------------------------------------------------------------------------- /node-dev-webpack/node-12/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/node-dev-base:12 2 | 3 | WORKDIR /var/www/project/buildchain/ 4 | 5 | # Run our webpack build in debug mode 6 | 7 | # We'd normally use `npm ci` here, but by using `install`: 8 | # - If `package-lock.json` is present, it will install what is in the lock file 9 | # - If `package-lock.json` is missing, it will update to the latest dependencies 10 | # and create the `package-lock-json` file 11 | # This automatic running adds to the startup overhead of `docker-compose up` 12 | # but saves far more time in not having to deal with out of sync versions 13 | # when working with teams or multiple environments 14 | CMD npm install \ 15 | && \ 16 | npm run debug 17 | -------------------------------------------------------------------------------- /node-dev-webpack/node-12-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/node-dev-base:12-alpine 2 | 3 | WORKDIR /var/www/project/buildchain/ 4 | 5 | # Run our webpack build in debug mode 6 | 7 | # We'd normally use `npm ci` here, but by using `install`: 8 | # - If `package-lock.json` is present, it will install what is in the lock file 9 | # - If `package-lock.json` is missing, it will update to the latest dependencies 10 | # and create the `package-lock-json` file 11 | # This automatic running adds to the startup overhead of `docker-compose up` 12 | # but saves far more time in not having to deal with out of sync versions 13 | # when working with teams or multiple environments 14 | CMD npm install \ 15 | && \ 16 | npm run debug 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 nystudio107 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /php-dev-base/php-7.4-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.4-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # pecl PHP extensions 26 | pecl install \ 27 | xdebug-2.9.8 \ 28 | && \ 29 | # Enable PHP extensions 30 | docker-php-ext-enable \ 31 | xdebug \ 32 | && \ 33 | # Remove the build deps 34 | apk del .build-deps \ 35 | && \ 36 | # Clean out directories that don't need to be part of the image 37 | rm -rf /tmp/* /var/tmp/* 38 | 39 | # Copy the `xdebug.ini` file into place for xdebug 40 | COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 41 | -------------------------------------------------------------------------------- /php-dev-craft/php-7.3/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-dev-base:7.3 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | mariadb-client \ 9 | nano \ 10 | jpegoptim \ 11 | optipng \ 12 | gifsicle \ 13 | webp \ 14 | && \ 15 | # Install PHP extensions 16 | docker-php-ext-install \ 17 | pdo_mysql \ 18 | && \ 19 | # Install Composer 20 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 21 | # Clean apt repo caches that don't need to be part of the image 22 | && \ 23 | apt-get clean \ 24 | && \ 25 | # Clean out directories that don't need to be part of the image 26 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 27 | 28 | WORKDIR /var/www/project 29 | 30 | # Create the storage directory and make it writeable by PHP 31 | RUN mkdir -p /var/www/project/cms/storage && \ 32 | mkdir -p /var/www/project/cms/storage/runtime && \ 33 | chown -R www-data:www-data /var/www/project/cms/storage 34 | 35 | # Create the cpresources directory and make it writeable by PHP 36 | RUN mkdir -p /var/www/project/cms/web/cpresources && \ 37 | chown -R www-data:www-data /var/www/project/cms/web/cpresources 38 | 39 | WORKDIR /var/www/project/cms 40 | 41 | # run container as the www-data user 42 | USER www-data 43 | -------------------------------------------------------------------------------- /php-dev-craft/php-7.4/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-dev-base:7.4 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | mariadb-client \ 9 | nano \ 10 | jpegoptim \ 11 | optipng \ 12 | gifsicle \ 13 | webp \ 14 | && \ 15 | # Install PHP extensions 16 | docker-php-ext-install \ 17 | pdo_mysql \ 18 | && \ 19 | # Install Composer 20 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 21 | # Clean apt repo caches that don't need to be part of the image 22 | && \ 23 | apt-get clean \ 24 | && \ 25 | # Clean out directories that don't need to be part of the image 26 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 27 | 28 | WORKDIR /var/www/project 29 | 30 | # Create the storage directory and make it writeable by PHP 31 | RUN mkdir -p /var/www/project/cms/storage && \ 32 | mkdir -p /var/www/project/cms/storage/runtime && \ 33 | chown -R www-data:www-data /var/www/project/cms/storage 34 | 35 | # Create the cpresources directory and make it writeable by PHP 36 | RUN mkdir -p /var/www/project/cms/web/cpresources && \ 37 | chown -R www-data:www-data /var/www/project/cms/web/cpresources 38 | 39 | WORKDIR /var/www/project/cms 40 | 41 | # run container as the www-data user 42 | USER www-data 43 | -------------------------------------------------------------------------------- /php-dev-base/php-8.1-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:8.1-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # pecl PHP extensions 26 | pecl install \ 27 | xdebug \ 28 | && \ 29 | # Enable PHP extensions 30 | docker-php-ext-enable \ 31 | xdebug \ 32 | && \ 33 | # Remove the build deps 34 | apk del .build-deps \ 35 | && \ 36 | # Clean out directories that don't need to be part of the image 37 | rm -rf /tmp/* /var/tmp/* 38 | 39 | # Copy the `xdebug.ini` file into place for xdebug 40 | COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 41 | 42 | # Copy the `zzz-docker-php.ini` file into place for php 43 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 44 | 45 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 46 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 47 | -------------------------------------------------------------------------------- /php-dev-base/php-8.2-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:8.2-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # pecl PHP extensions 26 | pecl install \ 27 | xdebug \ 28 | && \ 29 | # Enable PHP extensions 30 | docker-php-ext-enable \ 31 | xdebug \ 32 | && \ 33 | # Remove the build deps 34 | apk del .build-deps \ 35 | && \ 36 | # Clean out directories that don't need to be part of the image 37 | rm -rf /tmp/* /var/tmp/* 38 | 39 | # Copy the `xdebug.ini` file into place for xdebug 40 | COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 41 | 42 | # Copy the `zzz-docker-php.ini` file into place for php 43 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 44 | 45 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 46 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 47 | -------------------------------------------------------------------------------- /php-dev-base/php-8.3-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:8.3-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # pecl PHP extensions 26 | pecl install \ 27 | xdebug \ 28 | && \ 29 | # Enable PHP extensions 30 | docker-php-ext-enable \ 31 | xdebug \ 32 | && \ 33 | # Remove the build deps 34 | apk del .build-deps \ 35 | && \ 36 | # Clean out directories that don't need to be part of the image 37 | rm -rf /tmp/* /var/tmp/* 38 | 39 | # Copy the `xdebug.ini` file into place for xdebug 40 | COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 41 | 42 | # Copy the `zzz-docker-php.ini` file into place for php 43 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 44 | 45 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 46 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 47 | -------------------------------------------------------------------------------- /php-dev-base/php-8.4-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:8.4-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # pecl PHP extensions 26 | pecl install \ 27 | xdebug \ 28 | && \ 29 | # Enable PHP extensions 30 | docker-php-ext-enable \ 31 | xdebug \ 32 | && \ 33 | # Remove the build deps 34 | apk del .build-deps \ 35 | && \ 36 | # Clean out directories that don't need to be part of the image 37 | rm -rf /tmp/* /var/tmp/* 38 | 39 | # Copy the `xdebug.ini` file into place for xdebug 40 | COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 41 | 42 | # Copy the `zzz-docker-php.ini` file into place for php 43 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 44 | 45 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 46 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 47 | -------------------------------------------------------------------------------- /php-dev-base/php-8.0-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:8.0-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # pecl PHP extensions 26 | pecl install \ 27 | xdebug-3.0.2 \ 28 | && \ 29 | # Enable PHP extensions 30 | docker-php-ext-enable \ 31 | xdebug \ 32 | && \ 33 | # Remove the build deps 34 | apk del .build-deps \ 35 | && \ 36 | # Clean out directories that don't need to be part of the image 37 | rm -rf /tmp/* /var/tmp/* 38 | 39 | # Copy the `xdebug.ini` file into place for xdebug 40 | COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 41 | 42 | # Copy the `zzz-docker-php.ini` file into place for php 43 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 44 | 45 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 46 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 47 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | BUILDER_NAME?=craft-builder 2 | BUILD_PLATFORM?=linux/$(shell arch) 3 | BUILD_COMMAND?=docker buildx build --load --platform ${BUILD_PLATFORM} --builder ${BUILDER_NAME} 4 | IMAGE_NAMESPACE?=nystudio107 5 | PHP_PROD_NAMESPACE?=php-prod-base 6 | PHP_DEV_NAMESPACE?=php-dev-base 7 | NODE_NAMESPACE?=node-dev-base 8 | 9 | PHP_VERSIONS?=php-7.4-alpine php-8.0-alpine php-8.1-alpine php-8.2-alpine php-8.3-alpine php-8.4-alpine 10 | NODE_VERSIONS?=node-14-alpine node-16-alpine node-18-alpine node-20-alpine node-22-alpine 11 | 12 | .PHONY: all create-builder php $(PHP_VERSIONS) node $(NODE_VERSIONS) 13 | 14 | # Build all base images 15 | all: php node 16 | 17 | # Ensure a builder exists for docker buildx 18 | create-builder: 19 | -@if [ ! "$$(docker buildx inspect ${BUILDER_NAME} 2>/dev/null)" ]; then \ 20 | echo "No builder exists, creating builder: ${BUILDER_NAME}" ; \ 21 | docker buildx create --name ${BUILDER_NAME} ; \ 22 | fi 23 | 24 | # Build all php base images 25 | php:$(PHP_VERSIONS) 26 | 27 | # Build specific php prod & dev base images 28 | $(PHP_VERSIONS):create-builder 29 | ${BUILD_COMMAND} -t ${IMAGE_NAMESPACE}/${PHP_PROD_NAMESPACE}:$(subst php-,,$@) ${PHP_PROD_NAMESPACE}/$@ 30 | ${BUILD_COMMAND} -t ${IMAGE_NAMESPACE}/${PHP_DEV_NAMESPACE}:$(subst php-,,$@) ${PHP_DEV_NAMESPACE}/$@ 31 | 32 | # Build all node base images 33 | node:$(NODE_VERSIONS) 34 | 35 | # Build specific node base images 36 | $(NODE_VERSIONS):create-builder 37 | ${BUILD_COMMAND} -t ${IMAGE_NAMESPACE}/${NODE_NAMESPACE}:$(subst node-,,$@) ${NODE_NAMESPACE}/$@ 38 | -------------------------------------------------------------------------------- /node-dev-base/node-11/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:11 2 | 3 | # Install packages for headless chrome 4 | # https://medium.com/@ssmak/how-to-fix-puppetteer-error-while-loading-shared-libraries-libx11-xcb-so-1-c1918b75acc3 5 | RUN apt-get update \ 6 | && \ 7 | # apt Debian packages 8 | apt-get install -y --no-install-recommends \ 9 | ca-certificates \ 10 | dh-autoreconf \ 11 | fonts-liberation \ 12 | gconf-service \ 13 | libgl1-mesa-glx \ 14 | libasound2 \ 15 | libatk1.0-0 \ 16 | libc6 \ 17 | libcairo2 \ 18 | libcups2 \ 19 | libdbus-1-3 \ 20 | libexpat1 \ 21 | libfontconfig1 \ 22 | libgcc1 \ 23 | libgconf-2-4 \ 24 | libgdk-pixbuf2.0-0 \ 25 | libglib2.0-0 \ 26 | libgtk-3-0 \ 27 | libnspr4 \ 28 | libpango-1.0-0 \ 29 | libpangocairo-1.0-0 \ 30 | libstdc++6 \ 31 | libx11-6 \ 32 | libx11-xcb1 \ 33 | libxcb1 \ 34 | libxcomposite1 \ 35 | libxcursor1 \ 36 | libxdamage1 \ 37 | libxext6 \ 38 | libxfixes3 \ 39 | libxi6 \ 40 | libxrandr2 \ 41 | libxrender1 \ 42 | libxss1 \ 43 | libxtst6 \ 44 | libappindicator1 \ 45 | libnss3 \ 46 | lsb-release \ 47 | wget \ 48 | xdg-utils \ 49 | # Clean apt repo caches that don't need to be part of the image 50 | && \ 51 | apt-get clean \ 52 | && \ 53 | # Clean out directories that don't need to be part of the image 54 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 55 | -------------------------------------------------------------------------------- /node-dev-base/node-12/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12 2 | 3 | # Install packages for headless chrome 4 | # https://medium.com/@ssmak/how-to-fix-puppetteer-error-while-loading-shared-libraries-libx11-xcb-so-1-c1918b75acc3 5 | RUN apt-get update \ 6 | && \ 7 | # apt Debian packages 8 | apt-get install -y --no-install-recommends \ 9 | ca-certificates \ 10 | dh-autoreconf \ 11 | fonts-liberation \ 12 | gconf-service \ 13 | libgl1-mesa-glx \ 14 | libasound2 \ 15 | libatk1.0-0 \ 16 | libatk-bridge2.0-0 \ 17 | libc6 \ 18 | libcairo2 \ 19 | libcups2 \ 20 | libdbus-1-3 \ 21 | libexpat1 \ 22 | libfontconfig1 \ 23 | libgcc1 \ 24 | libgconf-2-4 \ 25 | libgdk-pixbuf2.0-0 \ 26 | libglib2.0-0 \ 27 | libgtk-3-0 \ 28 | libnspr4 \ 29 | libpango-1.0-0 \ 30 | libpangocairo-1.0-0 \ 31 | libstdc++6 \ 32 | libx11-6 \ 33 | libx11-xcb1 \ 34 | libxcb1 \ 35 | libxcomposite1 \ 36 | libxcursor1 \ 37 | libxdamage1 \ 38 | libxext6 \ 39 | libxfixes3 \ 40 | libxi6 \ 41 | libxrandr2 \ 42 | libxrender1 \ 43 | libxss1 \ 44 | libxtst6 \ 45 | libappindicator1 \ 46 | libnss3 \ 47 | lsb-release \ 48 | wget \ 49 | xdg-utils \ 50 | # Clean apt repo caches that don't need to be part of the image 51 | && \ 52 | apt-get clean \ 53 | && \ 54 | # Clean out directories that don't need to be part of the image 55 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 56 | -------------------------------------------------------------------------------- /node-dev-base/node-18-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine 2 | 3 | # Install packages for headless chrome 4 | RUN apk update \ 5 | && \ 6 | apk add --no-cache nmap \ 7 | && \ 8 | echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ 9 | && \ 10 | echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ 11 | && \ 12 | apk update \ 13 | && \ 14 | apk add --no-cache \ 15 | # Packages needed for npm install of mozjpeg & cwebp, can't --virtual and apk del later 16 | # Pre-builts do not work on alpine for either: 17 | # ref: https://github.com/imagemin/imagemin/issues/168 18 | # ref: https://github.com/imagemin/cwebp-bin/issues/27 19 | autoconf \ 20 | automake \ 21 | build-base \ 22 | g++ \ 23 | gcc \ 24 | glu \ 25 | libc6-compat \ 26 | libtool \ 27 | libpng-dev \ 28 | libxxf86vm \ 29 | make \ 30 | nasm \ 31 | # Misc packages 32 | nano \ 33 | # Image optimization packages 34 | gifsicle \ 35 | jpegoptim \ 36 | libpng-dev \ 37 | libwebp-tools \ 38 | libjpeg-turbo-dev \ 39 | libjpeg-turbo-utils \ 40 | optipng \ 41 | pngquant \ 42 | # Headless Chrome packages 43 | chromium \ 44 | harfbuzz \ 45 | "freetype>2.8" \ 46 | ttf-freefont \ 47 | nss 48 | 49 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true 50 | ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser 51 | ENV CHROME_BIN /usr/bin/chromium-browser 52 | ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser -------------------------------------------------------------------------------- /node-dev-base/node-12-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12-alpine 2 | 3 | # Install packages for headless chrome 4 | RUN apk update \ 5 | && \ 6 | apk add --no-cache nmap \ 7 | && \ 8 | echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ 9 | && \ 10 | echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ 11 | && \ 12 | apk update \ 13 | && \ 14 | apk add --no-cache \ 15 | # Packages needed for npm install of mozjpeg & cwebp, can't --virtual and apk del later 16 | # Pre-builts do not work on alpine for either: 17 | # ref: https://github.com/imagemin/imagemin/issues/168 18 | # ref: https://github.com/imagemin/cwebp-bin/issues/27 19 | autoconf \ 20 | automake \ 21 | build-base \ 22 | g++ \ 23 | gcc \ 24 | glu \ 25 | libc6-compat \ 26 | libtool \ 27 | libpng-dev \ 28 | libxxf86vm \ 29 | make \ 30 | nasm \ 31 | # Misc packages 32 | nano \ 33 | # Image optimization packages 34 | gifsicle \ 35 | jpegoptim \ 36 | libpng-dev \ 37 | libwebp-tools \ 38 | libjpeg-turbo-dev \ 39 | libjpeg-turbo-utils \ 40 | optipng \ 41 | pngquant \ 42 | # Headless Chrome packages 43 | chromium \ 44 | harfbuzz \ 45 | "freetype>2.8" \ 46 | ttf-freefont \ 47 | nss 48 | 49 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true 50 | ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser 51 | ENV CHROME_BIN /usr/bin/chromium-browser 52 | ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser 53 | -------------------------------------------------------------------------------- /node-dev-base/node-14-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14-alpine 2 | 3 | # Install packages for headless chrome 4 | RUN apk update \ 5 | && \ 6 | apk add --no-cache nmap \ 7 | && \ 8 | echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ 9 | && \ 10 | echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ 11 | && \ 12 | apk update \ 13 | && \ 14 | apk add --no-cache \ 15 | # Packages needed for npm install of mozjpeg & cwebp, can't --virtual and apk del later 16 | # Pre-builts do not work on alpine for either: 17 | # ref: https://github.com/imagemin/imagemin/issues/168 18 | # ref: https://github.com/imagemin/cwebp-bin/issues/27 19 | autoconf \ 20 | automake \ 21 | build-base \ 22 | g++ \ 23 | gcc \ 24 | glu \ 25 | libc6-compat \ 26 | libtool \ 27 | libpng-dev \ 28 | libxxf86vm \ 29 | make \ 30 | nasm \ 31 | # Misc packages 32 | nano \ 33 | # Image optimization packages 34 | gifsicle \ 35 | jpegoptim \ 36 | libpng-dev \ 37 | libwebp-tools \ 38 | libjpeg-turbo-dev \ 39 | libjpeg-turbo-utils \ 40 | optipng \ 41 | pngquant \ 42 | # Headless Chrome packages 43 | chromium \ 44 | harfbuzz \ 45 | "freetype>2.8" \ 46 | ttf-freefont \ 47 | nss 48 | 49 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true 50 | ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser 51 | ENV CHROME_BIN /usr/bin/chromium-browser 52 | ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser 53 | -------------------------------------------------------------------------------- /node-dev-base/node-16-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:16-alpine 2 | 3 | # Install packages for headless chrome 4 | RUN apk update \ 5 | && \ 6 | apk add --no-cache nmap \ 7 | && \ 8 | echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ 9 | && \ 10 | echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ 11 | && \ 12 | apk update \ 13 | && \ 14 | apk add --no-cache \ 15 | # Packages needed for npm install of mozjpeg & cwebp, can't --virtual and apk del later 16 | # Pre-builts do not work on alpine for either: 17 | # ref: https://github.com/imagemin/imagemin/issues/168 18 | # ref: https://github.com/imagemin/cwebp-bin/issues/27 19 | autoconf \ 20 | automake \ 21 | build-base \ 22 | g++ \ 23 | gcc \ 24 | glu \ 25 | libc6-compat \ 26 | libtool \ 27 | libpng-dev \ 28 | libxxf86vm \ 29 | make \ 30 | nasm \ 31 | # Misc packages 32 | nano \ 33 | # Image optimization packages 34 | gifsicle \ 35 | jpegoptim \ 36 | libpng-dev \ 37 | libwebp-tools \ 38 | libjpeg-turbo-dev \ 39 | libjpeg-turbo-utils \ 40 | optipng \ 41 | pngquant \ 42 | # Headless Chrome packages 43 | chromium \ 44 | harfbuzz \ 45 | "freetype>2.8" \ 46 | ttf-freefont \ 47 | nss 48 | 49 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true 50 | ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser 51 | ENV CHROME_BIN /usr/bin/chromium-browser 52 | ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser 53 | -------------------------------------------------------------------------------- /node-dev-base/node-20-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:20-alpine 2 | 3 | # Install packages for headless chrome 4 | RUN apk update \ 5 | && \ 6 | apk add --no-cache nmap \ 7 | && \ 8 | echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ 9 | && \ 10 | echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ 11 | && \ 12 | apk update \ 13 | && \ 14 | apk add --no-cache \ 15 | # Packages needed for npm install of mozjpeg & cwebp, can't --virtual and apk del later 16 | # Pre-builts do not work on alpine for either: 17 | # ref: https://github.com/imagemin/imagemin/issues/168 18 | # ref: https://github.com/imagemin/cwebp-bin/issues/27 19 | autoconf \ 20 | automake \ 21 | build-base \ 22 | g++ \ 23 | gcc \ 24 | glu \ 25 | libc6-compat \ 26 | libtool \ 27 | libpng-dev \ 28 | libxxf86vm \ 29 | make \ 30 | nasm \ 31 | # Misc packages 32 | nano \ 33 | # Image optimization packages 34 | gifsicle \ 35 | jpegoptim \ 36 | libpng-dev \ 37 | libwebp-tools \ 38 | libjpeg-turbo-dev \ 39 | libjpeg-turbo-utils \ 40 | optipng \ 41 | pngquant \ 42 | # Headless Chrome packages 43 | chromium \ 44 | harfbuzz \ 45 | "freetype>2.8" \ 46 | ttf-freefont \ 47 | nss 48 | 49 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true 50 | ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser 51 | ENV CHROME_BIN /usr/bin/chromium-browser 52 | ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser 53 | -------------------------------------------------------------------------------- /node-dev-base/node-22-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:22-alpine 2 | 3 | # Install packages for headless chrome 4 | RUN apk update \ 5 | && \ 6 | apk add --no-cache nmap \ 7 | && \ 8 | echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \ 9 | && \ 10 | echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \ 11 | && \ 12 | apk update \ 13 | && \ 14 | apk add --no-cache \ 15 | # Packages needed for npm install of mozjpeg & cwebp, can't --virtual and apk del later 16 | # Pre-builts do not work on alpine for either: 17 | # ref: https://github.com/imagemin/imagemin/issues/168 18 | # ref: https://github.com/imagemin/cwebp-bin/issues/27 19 | autoconf \ 20 | automake \ 21 | build-base \ 22 | g++ \ 23 | gcc \ 24 | glu \ 25 | libc6-compat \ 26 | libtool \ 27 | libpng-dev \ 28 | libxxf86vm \ 29 | make \ 30 | nasm \ 31 | # Misc packages 32 | nano \ 33 | # Image optimization packages 34 | gifsicle \ 35 | jpegoptim \ 36 | libpng-dev \ 37 | libwebp-tools \ 38 | libjpeg-turbo-dev \ 39 | libjpeg-turbo-utils \ 40 | optipng \ 41 | pngquant \ 42 | # Headless Chrome packages 43 | chromium \ 44 | harfbuzz \ 45 | "freetype>2.8" \ 46 | ttf-freefont \ 47 | nss 48 | 49 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true 50 | ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser 51 | ENV CHROME_BIN /usr/bin/chromium-browser 52 | ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser 53 | -------------------------------------------------------------------------------- /nginx/nginx-1.18/default.conf: -------------------------------------------------------------------------------- 1 | # default Docker DNS server 2 | resolver 127.0.0.11; 3 | 4 | map $cookie_XDEBUG_SESSION $my_fastcgi_pass { 5 | default php_xdebug; 6 | '' php; 7 | } 8 | 9 | server { 10 | listen 80; 11 | listen [::]:80; 12 | 13 | server_name _; 14 | root /var/www/project/cms/web; 15 | index index.html index.htm index.php; 16 | charset utf-8; 17 | 18 | gzip_static on; 19 | 20 | ssi on; 21 | 22 | client_max_body_size 0; 23 | 24 | error_page 404 /index.php?$query_string; 25 | 26 | access_log off; 27 | error_log /dev/stdout info; 28 | 29 | location = /favicon.ico { access_log off; log_not_found off; } 30 | 31 | location / { 32 | try_files $uri/index.html $uri $uri/ /index.php?$query_string; 33 | } 34 | 35 | location ~ [^/]\.php(/|$) { 36 | try_files $uri $uri/ /index.php?$query_string; 37 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 38 | fastcgi_pass $my_fastcgi_pass:9000; 39 | fastcgi_index index.php; 40 | include fastcgi_params; 41 | fastcgi_param PATH_INFO $fastcgi_path_info; 42 | fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 43 | fastcgi_param DOCUMENT_ROOT $realpath_root; 44 | fastcgi_param HTTP_PROXY ""; 45 | 46 | add_header Last-Modified $date_gmt; 47 | add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; 48 | if_modified_since off; 49 | expires off; 50 | etag off; 51 | 52 | fastcgi_intercept_errors off; 53 | fastcgi_buffer_size 16k; 54 | fastcgi_buffers 4 16k; 55 | fastcgi_connect_timeout 300; 56 | fastcgi_send_timeout 300; 57 | fastcgi_read_timeout 300; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /nginx/nginx-1.19-alpine/default.conf: -------------------------------------------------------------------------------- 1 | # default Docker DNS server 2 | resolver 127.0.0.11; 3 | 4 | map $cookie_XDEBUG_SESSION $my_fastcgi_pass { 5 | default php_xdebug; 6 | '' php; 7 | } 8 | 9 | server { 10 | listen 80; 11 | listen [::]:80; 12 | 13 | server_name _; 14 | root /var/www/project/cms/web; 15 | index index.html index.htm index.php; 16 | charset utf-8; 17 | 18 | gzip_static on; 19 | 20 | ssi on; 21 | 22 | client_max_body_size 0; 23 | 24 | error_page 404 /index.php?$query_string; 25 | 26 | access_log off; 27 | error_log /dev/stdout info; 28 | 29 | location = /favicon.ico { access_log off; log_not_found off; } 30 | 31 | location / { 32 | try_files $uri/index.html $uri $uri/ /index.php?$query_string; 33 | } 34 | 35 | location ~ [^/]\.php(/|$) { 36 | try_files $uri $uri/ /index.php?$query_string; 37 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 38 | fastcgi_pass $my_fastcgi_pass:9000; 39 | fastcgi_index index.php; 40 | include fastcgi_params; 41 | fastcgi_param PATH_INFO $fastcgi_path_info; 42 | fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 43 | fastcgi_param DOCUMENT_ROOT $realpath_root; 44 | fastcgi_param HTTP_PROXY ""; 45 | 46 | add_header Last-Modified $date_gmt; 47 | add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; 48 | if_modified_since off; 49 | expires off; 50 | etag off; 51 | 52 | fastcgi_intercept_errors off; 53 | fastcgi_buffer_size 16k; 54 | fastcgi_buffers 4 16k; 55 | fastcgi_connect_timeout 300; 56 | fastcgi_send_timeout 300; 57 | fastcgi_read_timeout 300; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /php-dev-craft/php-7.4-alpine/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-dev-base:7.4-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | su-exec \ 28 | gifsicle \ 29 | jpegoptim \ 30 | libwebp-tools \ 31 | nano \ 32 | optipng \ 33 | mysql-client \ 34 | && \ 35 | # Install PHP extensions 36 | docker-php-ext-install \ 37 | pdo_mysql \ 38 | && \ 39 | # Install Composer 40 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 41 | && \ 42 | # Remove the build deps 43 | apk del .build-deps \ 44 | && \ 45 | # Clean out directories that don't need to be part of the image 46 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 47 | 48 | WORKDIR /var/www/project 49 | 50 | RUN mkdir -p /var/www/project/cms/storage \ 51 | && \ 52 | mkdir -p /var/www/project/cms/web/cpresources \ 53 | && \ 54 | chown -R www-data:www-data /var/www/project 55 | 56 | WORKDIR /var/www/project/cms 57 | 58 | # Force permissions, update Craft, and start php-fpm 59 | CMD chown -R www-data:www-data /var/www/project \ 60 | && \ 61 | php-fpm 62 | -------------------------------------------------------------------------------- /php-dev-craft/php-8.0-alpine/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-dev-base:8.0-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | su-exec \ 28 | gifsicle \ 29 | jpegoptim \ 30 | libwebp-tools \ 31 | nano \ 32 | optipng \ 33 | mysql-client \ 34 | && \ 35 | # Install PHP extensions 36 | docker-php-ext-install \ 37 | pdo_mysql \ 38 | && \ 39 | # Install Composer 40 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 41 | && \ 42 | # Remove the build deps 43 | apk del .build-deps \ 44 | && \ 45 | # Clean out directories that don't need to be part of the image 46 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 47 | 48 | WORKDIR /var/www/project 49 | 50 | RUN mkdir -p /var/www/project/cms/storage \ 51 | && \ 52 | mkdir -p /var/www/project/cms/web/cpresources \ 53 | && \ 54 | chown -R www-data:www-data /var/www/project 55 | 56 | WORKDIR /var/www/project/cms 57 | 58 | # Force permissions, update Craft, and start php-fpm 59 | CMD chown -R www-data:www-data /var/www/project \ 60 | && \ 61 | php-fpm 62 | -------------------------------------------------------------------------------- /php-prod-base/php-7.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.3-fpm 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | apt-utils \ 9 | autoconf \ 10 | ca-certificates \ 11 | curl \ 12 | g++ \ 13 | libbz2-dev \ 14 | libfreetype6-dev \ 15 | libjpeg62-turbo-dev \ 16 | libpng-dev \ 17 | libpq-dev \ 18 | libssl-dev \ 19 | libicu-dev \ 20 | libmagickwand-dev \ 21 | libzip-dev \ 22 | unzip \ 23 | zip \ 24 | && \ 25 | # pecl PHP extensions 26 | pecl install \ 27 | imagick-3.4.4 \ 28 | redis \ 29 | && \ 30 | # Configure PHP extensions 31 | docker-php-ext-configure \ 32 | gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ 33 | && \ 34 | # Install PHP extensions 35 | docker-php-ext-install \ 36 | bcmath \ 37 | bz2 \ 38 | exif \ 39 | ftp \ 40 | gettext \ 41 | gd \ 42 | iconv \ 43 | intl \ 44 | mbstring \ 45 | opcache \ 46 | pdo \ 47 | shmop \ 48 | sockets \ 49 | sysvmsg \ 50 | sysvsem \ 51 | sysvshm \ 52 | zip \ 53 | && \ 54 | # Enable PHP extensions 55 | docker-php-ext-enable \ 56 | imagick \ 57 | redis \ 58 | # Clean apt repo caches that don't need to be part of the image 59 | && \ 60 | apt-get clean \ 61 | && \ 62 | # Clean out directories that don't need to be part of the image 63 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 64 | 65 | 66 | # Copy the `zzz-docker-php.ini` file into place for php 67 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 68 | 69 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 70 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 71 | -------------------------------------------------------------------------------- /php-prod-base/php-7.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.4-fpm 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | apt-utils \ 9 | autoconf \ 10 | ca-certificates \ 11 | curl \ 12 | g++ \ 13 | libonig-dev \ 14 | libbz2-dev \ 15 | libfreetype6-dev \ 16 | libjpeg62-turbo-dev \ 17 | libpng-dev \ 18 | libpq-dev \ 19 | libssl-dev \ 20 | libicu-dev \ 21 | libmagickwand-dev \ 22 | libzip-dev \ 23 | unzip \ 24 | zip \ 25 | && \ 26 | # pecl PHP extensions 27 | pecl install \ 28 | imagick-3.4.4 \ 29 | redis \ 30 | && \ 31 | # Configure PHP extensions 32 | docker-php-ext-configure \ 33 | gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \ 34 | && \ 35 | # Install PHP extensions 36 | docker-php-ext-install \ 37 | bcmath \ 38 | bz2 \ 39 | exif \ 40 | ftp \ 41 | gettext \ 42 | gd \ 43 | iconv \ 44 | intl \ 45 | mbstring \ 46 | opcache \ 47 | pdo \ 48 | shmop \ 49 | sockets \ 50 | sysvmsg \ 51 | sysvsem \ 52 | sysvshm \ 53 | zip \ 54 | && \ 55 | # Enable PHP extensions 56 | docker-php-ext-enable \ 57 | imagick \ 58 | redis \ 59 | # Clean apt repo caches that don't need to be part of the image 60 | && \ 61 | apt-get clean \ 62 | && \ 63 | # Clean out directories that don't need to be part of the image 64 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 65 | 66 | 67 | # Copy the `zzz-docker-php.ini` file into place for php 68 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 69 | 70 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 71 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 72 | -------------------------------------------------------------------------------- /php-dev-craft/php-7.4-alpine/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-dev-base:7.4-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | su-exec \ 28 | gifsicle \ 29 | jpegoptim \ 30 | libwebp-tools \ 31 | nano \ 32 | optipng \ 33 | postgresql-client \ 34 | postgresql-dev \ 35 | && \ 36 | # Install PHP extensions 37 | docker-php-ext-install \ 38 | pdo_pgsql \ 39 | pgsql \ 40 | && \ 41 | # Install Composer 42 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 43 | && \ 44 | # Remove the build deps 45 | apk del .build-deps \ 46 | && \ 47 | # Clean out directories that don't need to be part of the image 48 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 49 | 50 | WORKDIR /var/www/project 51 | 52 | RUN mkdir -p /var/www/project/cms/storage \ 53 | && \ 54 | mkdir -p /var/www/project/cms/web/cpresources \ 55 | && \ 56 | chown -R www-data:www-data /var/www/project 57 | 58 | WORKDIR /var/www/project/cms 59 | 60 | # Force permissions, update Craft, and start php-fpm 61 | CMD chown -R www-data:www-data /var/www/project \ 62 | && \ 63 | php-fpm 64 | -------------------------------------------------------------------------------- /php-dev-craft/php-8.0-alpine/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-dev-base:8.0-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | su-exec \ 28 | gifsicle \ 29 | jpegoptim \ 30 | libwebp-tools \ 31 | nano \ 32 | optipng \ 33 | postgresql-client \ 34 | postgresql-dev \ 35 | && \ 36 | # Install PHP extensions 37 | docker-php-ext-install \ 38 | pdo_pgsql \ 39 | pgsql \ 40 | && \ 41 | # Install Composer 42 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 43 | && \ 44 | # Remove the build deps 45 | apk del .build-deps \ 46 | && \ 47 | # Clean out directories that don't need to be part of the image 48 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 49 | 50 | WORKDIR /var/www/project 51 | 52 | RUN mkdir -p /var/www/project/cms/storage \ 53 | && \ 54 | mkdir -p /var/www/project/cms/web/cpresources \ 55 | && \ 56 | chown -R www-data:www-data /var/www/project 57 | 58 | WORKDIR /var/www/project/cms 59 | 60 | # Force permissions, update Craft, and start php-fpm 61 | CMD chown -R www-data:www-data /var/www/project \ 62 | && \ 63 | php-fpm 64 | -------------------------------------------------------------------------------- /php-dev-craft/php-7.3/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-dev-base:7.3 2 | 3 | # Install postgres repositories 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | lsb-release \ 9 | gnupg \ 10 | bash-completion \ 11 | wget \ 12 | && \ 13 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ 14 | && \ 15 | echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list 16 | 17 | # Install packages 18 | RUN apt-get update \ 19 | && \ 20 | # apt Debian packages 21 | apt-get install -y --no-install-recommends \ 22 | nano \ 23 | jpegoptim \ 24 | optipng \ 25 | gifsicle \ 26 | webp \ 27 | postgresql-client-12 \ 28 | && \ 29 | # Install PHP extensions 30 | docker-php-ext-install \ 31 | pdo_pgsql \ 32 | pgsql \ 33 | && \ 34 | # Install Composer 35 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 36 | # Clean apt repo caches that don't need to be part of the image 37 | && \ 38 | apt-get clean \ 39 | && \ 40 | # Clean out directories that don't need to be part of the image 41 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | WORKDIR /var/www/project 44 | 45 | # Create the storage directory and make it writeable by PHP 46 | RUN mkdir -p /var/www/project/cms/storage && \ 47 | mkdir -p /var/www/project/cms/storage/runtime && \ 48 | chown -R www-data:www-data /var/www/project/cms/storage 49 | 50 | # Create the cpresources directory and make it writeable by PHP 51 | RUN mkdir -p /var/www/project/cms/web/cpresources && \ 52 | chown -R www-data:www-data /var/www/project/cms/web/cpresources 53 | 54 | WORKDIR /var/www/project/cms 55 | 56 | # run container as the www-data user 57 | USER www-data 58 | -------------------------------------------------------------------------------- /php-dev-craft/php-7.4/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-dev-base:7.4 2 | 3 | # Install postgres repositories 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | lsb-release \ 9 | gnupg \ 10 | bash-completion \ 11 | wget \ 12 | && \ 13 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ 14 | && \ 15 | echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list 16 | 17 | # Install packages 18 | RUN apt-get update \ 19 | && \ 20 | # apt Debian packages 21 | apt-get install -y --no-install-recommends \ 22 | nano \ 23 | jpegoptim \ 24 | optipng \ 25 | gifsicle \ 26 | webp \ 27 | postgresql-client-12 \ 28 | && \ 29 | # Install PHP extensions 30 | docker-php-ext-install \ 31 | pdo_pgsql \ 32 | pgsql \ 33 | && \ 34 | # Install Composer 35 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 36 | # Clean apt repo caches that don't need to be part of the image 37 | && \ 38 | apt-get clean \ 39 | && \ 40 | # Clean out directories that don't need to be part of the image 41 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | WORKDIR /var/www/project 44 | 45 | # Create the storage directory and make it writeable by PHP 46 | RUN mkdir -p /var/www/project/cms/storage && \ 47 | mkdir -p /var/www/project/cms/storage/runtime && \ 48 | chown -R www-data:www-data /var/www/project/cms/storage 49 | 50 | # Create the cpresources directory and make it writeable by PHP 51 | RUN mkdir -p /var/www/project/cms/web/cpresources && \ 52 | chown -R www-data:www-data /var/www/project/cms/web/cpresources 53 | 54 | WORKDIR /var/www/project/cms 55 | 56 | # run container as the www-data user 57 | USER www-data 58 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.3/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.3 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | mariadb-client \ 9 | nano \ 10 | jpegoptim \ 11 | optipng \ 12 | gifsicle \ 13 | webp \ 14 | && \ 15 | # Install PHP extensions 16 | docker-php-ext-install \ 17 | pdo_mysql \ 18 | && \ 19 | # Install Composer 20 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 21 | # Clean apt repo caches that don't need to be part of the image 22 | && \ 23 | apt-get clean \ 24 | && \ 25 | # Clean out directories that don't need to be part of the image 26 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 27 | 28 | WORKDIR /var/www/project 29 | 30 | COPY ./run_queue.sh . 31 | RUN chmod a+x run_queue.sh 32 | 33 | # Create the storage directory and make it writeable by PHP 34 | RUN mkdir -p /var/www/project/cms/storage && \ 35 | mkdir -p /var/www/project/cms/storage/runtime && \ 36 | chown -R www-data:www-data /var/www/project/cms/storage 37 | 38 | # Create the cpresources directory and make it writeable by PHP 39 | RUN mkdir -p /var/www/project/cms/web/cpresources && \ 40 | chown -R www-data:www-data /var/www/project/cms/web/cpresources 41 | 42 | WORKDIR /var/www/project/cms 43 | 44 | # run container as the www-data user 45 | USER www-data 46 | 47 | # Force permissions, update Craft, and start php-fpm 48 | 49 | # Do a `composer install` without running any Composer scripts 50 | # - If `composer.lock` is present, it will install what is in the lock file 51 | # - If `composer.lock` is missing, it will update to the latest dependencies 52 | # and create the `composer.lock` file 53 | # This automatic running adds to the startup overhead of `docker-compose up` 54 | # but saves far more time in not having to deal with out of sync versions 55 | # when working with teams or multiple environments 56 | CMD composer install --no-scripts --optimize-autoloader --no-interaction \ 57 | && \ 58 | chown -R www-data:www-data /var/www/project/cms/vendor \ 59 | && \ 60 | chown -R www-data:www-data /var/www/project/cms/storage \ 61 | && \ 62 | chown -R www-data:www-data /var/www/project/cms/web \ 63 | && \ 64 | composer craft-update \ 65 | && \ 66 | php-fpm 67 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.4/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.4 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | mariadb-client \ 9 | nano \ 10 | jpegoptim \ 11 | optipng \ 12 | gifsicle \ 13 | webp \ 14 | && \ 15 | # Install PHP extensions 16 | docker-php-ext-install \ 17 | pdo_mysql \ 18 | && \ 19 | # Install Composer 20 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 21 | # Clean apt repo caches that don't need to be part of the image 22 | && \ 23 | apt-get clean \ 24 | && \ 25 | # Clean out directories that don't need to be part of the image 26 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 27 | 28 | WORKDIR /var/www/project 29 | 30 | COPY ./run_queue.sh . 31 | RUN chmod a+x run_queue.sh 32 | 33 | # Create the storage directory and make it writeable by PHP 34 | RUN mkdir -p /var/www/project/cms/storage && \ 35 | mkdir -p /var/www/project/cms/storage/runtime && \ 36 | chown -R www-data:www-data /var/www/project/cms/storage 37 | 38 | # Create the cpresources directory and make it writeable by PHP 39 | RUN mkdir -p /var/www/project/cms/web/cpresources && \ 40 | chown -R www-data:www-data /var/www/project/cms/web/cpresources 41 | 42 | WORKDIR /var/www/project/cms 43 | 44 | # run container as the www-data user 45 | USER www-data 46 | 47 | # Force permissions, update Craft, and start php-fpm 48 | 49 | # Do a `composer install` without running any Composer scripts 50 | # - If `composer.lock` is present, it will install what is in the lock file 51 | # - If `composer.lock` is missing, it will update to the latest dependencies 52 | # and create the `composer.lock` file 53 | # This automatic running adds to the startup overhead of `docker-compose up` 54 | # but saves far more time in not having to deal with out of sync versions 55 | # when working with teams or multiple environments 56 | CMD composer install --no-scripts --optimize-autoloader --no-interaction \ 57 | && \ 58 | chown -R www-data:www-data /var/www/project/cms/vendor \ 59 | && \ 60 | chown -R www-data:www-data /var/www/project/cms/storage \ 61 | && \ 62 | chown -R www-data:www-data /var/www/project/cms/web \ 63 | && \ 64 | composer craft-update \ 65 | && \ 66 | php-fpm 67 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.4-alpine/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.4-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | su-exec \ 28 | gifsicle \ 29 | jpegoptim \ 30 | libwebp-tools \ 31 | nano \ 32 | optipng \ 33 | mysql-client \ 34 | && \ 35 | # Install PHP extensions 36 | docker-php-ext-install \ 37 | pdo_mysql \ 38 | && \ 39 | # Install Composer 40 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 41 | && \ 42 | # Remove the build deps 43 | apk del .build-deps \ 44 | && \ 45 | # Clean out directories that don't need to be part of the image 46 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 47 | 48 | WORKDIR /var/www/project 49 | 50 | COPY ./run_queue.sh . 51 | RUN chmod a+x run_queue.sh \ 52 | && \ 53 | mkdir -p /var/www/project/cms/storage \ 54 | && \ 55 | mkdir -p /var/www/project/cms/web/cpresources \ 56 | && \ 57 | chown -R www-data:www-data /var/www/project 58 | 59 | WORKDIR /var/www/project/cms 60 | 61 | # Force permissions, update Craft, and start php-fpm 62 | 63 | # Do a `composer install` without running any Composer scripts 64 | # - If `composer.lock` is present, it will install what is in the lock file 65 | # - If `composer.lock` is missing, it will update to the latest dependencies 66 | # and create the `composer.lock` file 67 | # This automatic running adds to the startup overhead of `docker-compose up` 68 | # but saves far more time in not having to deal with out of sync versions 69 | # when working with teams or multiple environments 70 | CMD chown -R www-data:www-data /var/www/project \ 71 | && \ 72 | su-exec www-data composer install --verbose --no-progress --no-scripts --optimize-autoloader --no-interaction \ 73 | && \ 74 | su-exec www-data composer craft-update \ 75 | && \ 76 | php-fpm 77 | -------------------------------------------------------------------------------- /php-prod-craft/php-8.0-alpine/mariadb/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:8.0-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | su-exec \ 28 | gifsicle \ 29 | jpegoptim \ 30 | libwebp-tools \ 31 | nano \ 32 | optipng \ 33 | mysql-client \ 34 | && \ 35 | # Install PHP extensions 36 | docker-php-ext-install \ 37 | pdo_mysql \ 38 | && \ 39 | # Install Composer 40 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 41 | && \ 42 | # Remove the build deps 43 | apk del .build-deps \ 44 | && \ 45 | # Clean out directories that don't need to be part of the image 46 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 47 | 48 | WORKDIR /var/www/project 49 | 50 | COPY ./run_queue.sh . 51 | RUN chmod a+x run_queue.sh \ 52 | && \ 53 | mkdir -p /var/www/project/cms/storage \ 54 | && \ 55 | mkdir -p /var/www/project/cms/web/cpresources \ 56 | && \ 57 | chown -R www-data:www-data /var/www/project 58 | 59 | WORKDIR /var/www/project/cms 60 | 61 | # Force permissions, update Craft, and start php-fpm 62 | 63 | # Do a `composer install` without running any Composer scripts 64 | # - If `composer.lock` is present, it will install what is in the lock file 65 | # - If `composer.lock` is missing, it will update to the latest dependencies 66 | # and create the `composer.lock` file 67 | # This automatic running adds to the startup overhead of `docker-compose up` 68 | # but saves far more time in not having to deal with out of sync versions 69 | # when working with teams or multiple environments 70 | CMD chown -R www-data:www-data /var/www/project \ 71 | && \ 72 | su-exec www-data composer install --verbose --no-progress --no-scripts --optimize-autoloader --no-interaction \ 73 | && \ 74 | su-exec www-data composer craft-update \ 75 | && \ 76 | php-fpm 77 | -------------------------------------------------------------------------------- /php-prod-base/php-8.2-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.2-fpm-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | bzip2-dev \ 28 | ca-certificates \ 29 | curl \ 30 | fcgi \ 31 | freetype-dev \ 32 | gettext-dev \ 33 | icu-dev \ 34 | icu-data-full \ 35 | imagemagick-dev \ 36 | jpeg-dev \ 37 | libpng-dev \ 38 | libwebp-dev \ 39 | libzip-dev \ 40 | libtool \ 41 | libxml2-dev \ 42 | libzip-dev \ 43 | oniguruma-dev \ 44 | openssl-dev \ 45 | unzip \ 46 | && \ 47 | # pecl PHP extensions 48 | pecl install \ 49 | redis \ 50 | && \ 51 | # Configure PHP extensions 52 | docker-php-ext-configure \ 53 | # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 54 | gd --enable-gd --with-freetype --with-jpeg --with-webp \ 55 | && \ 56 | pecl install \ 57 | imagick \ 58 | && \ 59 | # Install PHP extensions 60 | docker-php-ext-install -j$(nproc) \ 61 | bcmath \ 62 | bz2 \ 63 | exif \ 64 | ftp \ 65 | gettext \ 66 | gd \ 67 | intl \ 68 | mbstring \ 69 | opcache \ 70 | pdo \ 71 | shmop \ 72 | sockets \ 73 | sysvmsg \ 74 | sysvsem \ 75 | sysvshm \ 76 | zip \ 77 | && \ 78 | # Enable PHP extensions 79 | docker-php-ext-enable \ 80 | imagick \ 81 | redis \ 82 | && \ 83 | # Remove the build deps 84 | apk del .build-deps \ 85 | && \ 86 | # Clean out directories that don't need to be part of the image 87 | rm -rf /tmp/* /var/tmp/* 88 | 89 | # Copy the `zzz-docker-php.ini` file into place for php 90 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 91 | 92 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 93 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 94 | -------------------------------------------------------------------------------- /php-prod-base/php-8.1-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.1-fpm-alpine3.17 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | bzip2-dev \ 28 | ca-certificates \ 29 | curl \ 30 | fcgi \ 31 | freetype-dev \ 32 | gettext-dev \ 33 | icu-dev \ 34 | icu-data-full \ 35 | imagemagick-dev \ 36 | jpeg-dev \ 37 | libpng-dev \ 38 | libwebp-dev \ 39 | libzip-dev \ 40 | libtool \ 41 | libxml2-dev \ 42 | libzip-dev \ 43 | oniguruma-dev \ 44 | openssl-dev \ 45 | unzip \ 46 | && \ 47 | # pecl PHP extensions 48 | pecl install \ 49 | redis \ 50 | && \ 51 | # Configure PHP extensions 52 | docker-php-ext-configure \ 53 | # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 54 | gd --enable-gd --with-freetype --with-jpeg --with-webp \ 55 | && \ 56 | pecl install \ 57 | imagick \ 58 | && \ 59 | # Install PHP extensions 60 | docker-php-ext-install -j$(nproc) \ 61 | bcmath \ 62 | bz2 \ 63 | exif \ 64 | ftp \ 65 | gettext \ 66 | gd \ 67 | intl \ 68 | mbstring \ 69 | opcache \ 70 | pdo \ 71 | shmop \ 72 | sockets \ 73 | sysvmsg \ 74 | sysvsem \ 75 | sysvshm \ 76 | zip \ 77 | && \ 78 | # Enable PHP extensions 79 | docker-php-ext-enable \ 80 | imagick \ 81 | redis \ 82 | && \ 83 | # Remove the build deps 84 | apk del .build-deps \ 85 | && \ 86 | # Clean out directories that don't need to be part of the image 87 | rm -rf /tmp/* /var/tmp/* 88 | 89 | # Copy the `zzz-docker-php.ini` file into place for php 90 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 91 | 92 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 93 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 94 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.4-alpine/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.4-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | su-exec \ 28 | gifsicle \ 29 | jpegoptim \ 30 | libwebp-tools \ 31 | nano \ 32 | optipng \ 33 | postgresql-client \ 34 | postgresql-dev \ 35 | && \ 36 | # Install PHP extensions 37 | docker-php-ext-install \ 38 | pdo_pgsql \ 39 | pgsql \ 40 | && \ 41 | # Install Composer 42 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 43 | && \ 44 | # Remove the build deps 45 | apk del .build-deps \ 46 | && \ 47 | # Clean out directories that don't need to be part of the image 48 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 49 | 50 | WORKDIR /var/www/project 51 | 52 | COPY ./run_queue.sh . 53 | RUN chmod a+x run_queue.sh \ 54 | && \ 55 | mkdir -p /var/www/project/cms/storage \ 56 | && \ 57 | mkdir -p /var/www/project/cms/web/cpresources \ 58 | && \ 59 | chown -R www-data:www-data /var/www/project 60 | 61 | WORKDIR /var/www/project/cms 62 | 63 | # Force permissions, update Craft, and start php-fpm 64 | 65 | # Do a `composer install` without running any Composer scripts 66 | # - If `composer.lock` is present, it will install what is in the lock file 67 | # - If `composer.lock` is missing, it will update to the latest dependencies 68 | # and create the `composer.lock` file 69 | # This automatic running adds to the startup overhead of `docker-compose up` 70 | # but saves far more time in not having to deal with out of sync versions 71 | # when working with teams or multiple environments 72 | CMD chown -R www-data:www-data /var/www/project \ 73 | && \ 74 | su-exec www-data composer install --verbose --no-progress --no-scripts --optimize-autoloader --no-interaction \ 75 | && \ 76 | su-exec www-data composer craft-update \ 77 | && \ 78 | php-fpm 79 | -------------------------------------------------------------------------------- /php-prod-craft/php-8.0-alpine/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:8.0-alpine 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | su-exec \ 28 | gifsicle \ 29 | jpegoptim \ 30 | libwebp-tools \ 31 | nano \ 32 | optipng \ 33 | postgresql-client \ 34 | postgresql-dev \ 35 | && \ 36 | # Install PHP extensions 37 | docker-php-ext-install \ 38 | pdo_pgsql \ 39 | pgsql \ 40 | && \ 41 | # Install Composer 42 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 43 | && \ 44 | # Remove the build deps 45 | apk del .build-deps \ 46 | && \ 47 | # Clean out directories that don't need to be part of the image 48 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 49 | 50 | WORKDIR /var/www/project 51 | 52 | COPY ./run_queue.sh . 53 | RUN chmod a+x run_queue.sh \ 54 | && \ 55 | mkdir -p /var/www/project/cms/storage \ 56 | && \ 57 | mkdir -p /var/www/project/cms/web/cpresources \ 58 | && \ 59 | chown -R www-data:www-data /var/www/project 60 | 61 | WORKDIR /var/www/project/cms 62 | 63 | # Force permissions, update Craft, and start php-fpm 64 | 65 | # Do a `composer install` without running any Composer scripts 66 | # - If `composer.lock` is present, it will install what is in the lock file 67 | # - If `composer.lock` is missing, it will update to the latest dependencies 68 | # and create the `composer.lock` file 69 | # This automatic running adds to the startup overhead of `docker-compose up` 70 | # but saves far more time in not having to deal with out of sync versions 71 | # when working with teams or multiple environments 72 | CMD chown -R www-data:www-data /var/www/project \ 73 | && \ 74 | su-exec www-data composer install --verbose --no-progress --no-scripts --optimize-autoloader --no-interaction \ 75 | && \ 76 | su-exec www-data composer craft-update \ 77 | && \ 78 | php-fpm 79 | -------------------------------------------------------------------------------- /php-prod-base/php-8.3-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.3-fpm-alpine 2 | 3 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 4 | 5 | # Install packages 6 | RUN set -eux; \ 7 | # Packages needed only for build 8 | apk add --no-cache --virtual .build-deps \ 9 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 10 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 11 | $PHPIZE_DEPS \ 12 | # Build deps 13 | autoconf \ 14 | dpkg-dev \ 15 | dpkg \ 16 | file \ 17 | g++ \ 18 | gcc \ 19 | libc-dev \ 20 | make \ 21 | pkgconf \ 22 | re2c \ 23 | libtool \ 24 | linux-headers \ 25 | wget \ 26 | && \ 27 | # Packages to install 28 | apk add --no-cache \ 29 | bzip2-dev \ 30 | ca-certificates \ 31 | curl \ 32 | fcgi \ 33 | freetype-dev \ 34 | gettext-dev \ 35 | icu-dev \ 36 | icu-data-full \ 37 | imagemagick-dev \ 38 | jpeg-dev \ 39 | libpng-dev \ 40 | libwebp-dev \ 41 | libzip-dev \ 42 | libtool \ 43 | libxml2-dev \ 44 | libzip-dev \ 45 | oniguruma-dev \ 46 | openssl-dev \ 47 | unzip \ 48 | && \ 49 | # pecl PHP extensions 50 | pecl install \ 51 | redis \ 52 | && \ 53 | # Configure PHP extensions 54 | docker-php-ext-configure \ 55 | # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 56 | gd --enable-gd --with-freetype --with-jpeg --with-webp \ 57 | && \ 58 | install-php-extensions \ 59 | gmagick \ 60 | && \ 61 | # Install PHP extensions 62 | docker-php-ext-install -j$(nproc) \ 63 | bcmath \ 64 | bz2 \ 65 | exif \ 66 | ftp \ 67 | gettext \ 68 | gd \ 69 | intl \ 70 | mbstring \ 71 | opcache \ 72 | pdo \ 73 | shmop \ 74 | sockets \ 75 | sysvmsg \ 76 | sysvsem \ 77 | sysvshm \ 78 | zip \ 79 | && \ 80 | # Enable PHP extensions 81 | docker-php-ext-enable \ 82 | gmagick \ 83 | redis \ 84 | && \ 85 | # Remove the build deps 86 | apk del .build-deps \ 87 | && \ 88 | # Clean out directories that don't need to be part of the image 89 | rm -rf /tmp/* /var/tmp/* 90 | 91 | # Copy the `zzz-docker-php.ini` file into place for php 92 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 93 | 94 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 95 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 96 | -------------------------------------------------------------------------------- /php-prod-base/php-8.4-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.4-fpm-alpine 2 | 3 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 4 | 5 | # Install packages 6 | RUN set -eux; \ 7 | # Packages needed only for build 8 | apk add --no-cache --virtual .build-deps \ 9 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 10 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 11 | $PHPIZE_DEPS \ 12 | # Build deps 13 | autoconf \ 14 | dpkg-dev \ 15 | dpkg \ 16 | file \ 17 | g++ \ 18 | gcc \ 19 | libc-dev \ 20 | make \ 21 | pkgconf \ 22 | re2c \ 23 | libtool \ 24 | linux-headers \ 25 | wget \ 26 | && \ 27 | # Packages to install 28 | apk add --no-cache \ 29 | bzip2-dev \ 30 | ca-certificates \ 31 | curl \ 32 | fcgi \ 33 | freetype-dev \ 34 | gettext-dev \ 35 | icu-dev \ 36 | icu-data-full \ 37 | imagemagick-dev \ 38 | jpeg-dev \ 39 | libpng-dev \ 40 | libwebp-dev \ 41 | libzip-dev \ 42 | libtool \ 43 | libxml2-dev \ 44 | libzip-dev \ 45 | oniguruma-dev \ 46 | openssl-dev \ 47 | unzip \ 48 | && \ 49 | # pecl PHP extensions 50 | pecl install \ 51 | redis \ 52 | && \ 53 | # Configure PHP extensions 54 | docker-php-ext-configure \ 55 | # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 56 | gd --enable-gd --with-freetype --with-jpeg --with-webp \ 57 | && \ 58 | install-php-extensions \ 59 | gmagick \ 60 | && \ 61 | # Install PHP extensions 62 | docker-php-ext-install -j$(nproc) \ 63 | bcmath \ 64 | bz2 \ 65 | exif \ 66 | ftp \ 67 | gettext \ 68 | gd \ 69 | intl \ 70 | mbstring \ 71 | opcache \ 72 | pdo \ 73 | shmop \ 74 | sockets \ 75 | sysvmsg \ 76 | sysvsem \ 77 | sysvshm \ 78 | zip \ 79 | && \ 80 | # Enable PHP extensions 81 | docker-php-ext-enable \ 82 | gmagick \ 83 | redis \ 84 | && \ 85 | # Remove the build deps 86 | apk del .build-deps \ 87 | && \ 88 | # Clean out directories that don't need to be part of the image 89 | rm -rf /tmp/* /var/tmp/* 90 | 91 | # Copy the `zzz-docker-php.ini` file into place for php 92 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 93 | 94 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 95 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 96 | -------------------------------------------------------------------------------- /php-prod-base/php-7.4-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.4-fpm-alpine3.13 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | bzip2-dev \ 28 | ca-certificates \ 29 | curl \ 30 | fcgi \ 31 | freetype-dev \ 32 | gettext-dev \ 33 | gnu-libiconv \ 34 | icu-dev \ 35 | imagemagick \ 36 | imagemagick-dev \ 37 | libjpeg-turbo-dev \ 38 | libmcrypt-dev \ 39 | libpng \ 40 | libpng-dev \ 41 | libressl-dev \ 42 | libtool \ 43 | libwebp-dev \ 44 | libxml2-dev \ 45 | libzip-dev \ 46 | oniguruma-dev \ 47 | unzip \ 48 | && \ 49 | # pecl PHP extensions 50 | pecl install \ 51 | imagick-3.4.4 \ 52 | redis \ 53 | && \ 54 | # Configure PHP extensions 55 | docker-php-ext-configure \ 56 | # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 57 | gd --enable-gd --with-freetype --with-jpeg --with-webp \ 58 | && \ 59 | # Install PHP extensions 60 | docker-php-ext-install \ 61 | bcmath \ 62 | bz2 \ 63 | exif \ 64 | ftp \ 65 | gettext \ 66 | gd \ 67 | iconv \ 68 | intl \ 69 | mbstring \ 70 | opcache \ 71 | pdo \ 72 | shmop \ 73 | sockets \ 74 | sysvmsg \ 75 | sysvsem \ 76 | sysvshm \ 77 | zip \ 78 | && \ 79 | # Enable PHP extensions 80 | docker-php-ext-enable \ 81 | imagick \ 82 | redis \ 83 | && \ 84 | # Remove the build deps 85 | apk del .build-deps \ 86 | && \ 87 | # Clean out directories that don't need to be part of the image 88 | rm -rf /tmp/* /var/tmp/* 89 | 90 | # https://github.com/docker-library/php/issues/1121 91 | ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php 92 | 93 | # Copy the `zzz-docker-php.ini` file into place for php 94 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 95 | 96 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 97 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 98 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.3/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.3 2 | 3 | # Install postgres repositories 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | lsb-release \ 9 | gnupg \ 10 | bash-completion \ 11 | wget \ 12 | && \ 13 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ 14 | && \ 15 | echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list 16 | 17 | # Install packages 18 | RUN apt-get update \ 19 | && \ 20 | # apt Debian packages 21 | apt-get install -y --no-install-recommends \ 22 | nano \ 23 | jpegoptim \ 24 | optipng \ 25 | gifsicle \ 26 | webp \ 27 | postgresql-client-12 \ 28 | && \ 29 | # Install PHP extensions 30 | docker-php-ext-install \ 31 | pdo_pgsql \ 32 | pgsql \ 33 | && \ 34 | # Install Composer 35 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 36 | # Clean apt repo caches that don't need to be part of the image 37 | && \ 38 | apt-get clean \ 39 | && \ 40 | # Clean out directories that don't need to be part of the image 41 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | WORKDIR /var/www/project 44 | 45 | COPY ./run_queue.sh . 46 | RUN chmod a+x run_queue.sh 47 | 48 | # Create the storage directory and make it writeable by PHP 49 | RUN mkdir -p /var/www/project/cms/storage && \ 50 | mkdir -p /var/www/project/cms/storage/runtime && \ 51 | chown -R www-data:www-data /var/www/project/cms/storage 52 | 53 | # Create the cpresources directory and make it writeable by PHP 54 | RUN mkdir -p /var/www/project/cms/web/cpresources && \ 55 | chown -R www-data:www-data /var/www/project/cms/web/cpresources 56 | 57 | WORKDIR /var/www/project/cms 58 | 59 | # run container as the www-data user 60 | USER www-data 61 | 62 | # Force permissions, update Craft, and start php-fpm 63 | 64 | # Do a `composer install` without running any Composer scripts 65 | # - If `composer.lock` is present, it will install what is in the lock file 66 | # - If `composer.lock` is missing, it will update to the latest dependencies 67 | # and create the `composer.lock` file 68 | # This automatic running adds to the startup overhead of `docker-compose up` 69 | # but saves far more time in not having to deal with out of sync versions 70 | # when working with teams or multiple environments 71 | CMD composer install --no-scripts --optimize-autoloader --no-interaction \ 72 | && \ 73 | chown -R www-data:www-data /var/www/project/cms/vendor \ 74 | && \ 75 | chown -R www-data:www-data /var/www/project/cms/storage \ 76 | && \ 77 | chown -R www-data:www-data /var/www/project/cms/web \ 78 | && \ 79 | composer craft-update \ 80 | && \ 81 | php-fpm 82 | -------------------------------------------------------------------------------- /php-prod-craft/php-7.4/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nystudio107/php-prod-base:7.4 2 | 3 | # Install postgres repositories 4 | RUN apt-get update \ 5 | && \ 6 | # apt Debian packages 7 | apt-get install -y --no-install-recommends \ 8 | lsb-release \ 9 | gnupg \ 10 | bash-completion \ 11 | wget \ 12 | && \ 13 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ 14 | && \ 15 | echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list 16 | 17 | # Install packages 18 | RUN apt-get update \ 19 | && \ 20 | # apt Debian packages 21 | apt-get install -y --no-install-recommends \ 22 | nano \ 23 | jpegoptim \ 24 | optipng \ 25 | gifsicle \ 26 | webp \ 27 | postgresql-client-12 \ 28 | && \ 29 | # Install PHP extensions 30 | docker-php-ext-install \ 31 | pdo_pgsql \ 32 | pgsql \ 33 | && \ 34 | # Install Composer 35 | curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \ 36 | # Clean apt repo caches that don't need to be part of the image 37 | && \ 38 | apt-get clean \ 39 | && \ 40 | # Clean out directories that don't need to be part of the image 41 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | WORKDIR /var/www/project 44 | 45 | # run container as the www-data user 46 | USER www-data 47 | 48 | COPY ./run_queue.sh . 49 | RUN chmod a+x run_queue.sh 50 | 51 | # Create the storage directory and make it writeable by PHP 52 | RUN mkdir -p /var/www/project/cms/storage && \ 53 | mkdir -p /var/www/project/cms/storage/runtime && \ 54 | chown -R www-data:www-data /var/www/project/cms/storage 55 | 56 | # Create the cpresources directory and make it writeable by PHP 57 | RUN mkdir -p /var/www/project/cms/web/cpresources && \ 58 | chown -R www-data:www-data /var/www/project/cms/web/cpresources 59 | 60 | WORKDIR /var/www/project/cms 61 | 62 | # Force permissions, update Craft, and start php-fpm 63 | 64 | # Do a `composer install` without running any Composer scripts 65 | # - If `composer.lock` is present, it will install what is in the lock file 66 | # - If `composer.lock` is missing, it will update to the latest dependencies 67 | # and create the `composer.lock` file 68 | # This automatic running adds to the startup overhead of `docker-compose up` 69 | # but saves far more time in not having to deal with out of sync versions 70 | # when working with teams or multiple environments 71 | CMD composer install --no-scripts --optimize-autoloader --no-interaction \ 72 | && \ 73 | chown -R www-data:www-data /var/www/project/cms/vendor \ 74 | && \ 75 | chown -R www-data:www-data /var/www/project/cms/storage \ 76 | && \ 77 | chown -R www-data:www-data /var/www/project/cms/web \ 78 | && \ 79 | composer craft-update \ 80 | && \ 81 | php-fpm 82 | -------------------------------------------------------------------------------- /.github/workflows/build-and-push-docker-images.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push Docker Images 2 | on: 3 | push: 4 | tags: 5 | - '*.*.*' 6 | workflow_dispatch: 7 | jobs: 8 | build-node: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | node: ["16", "18", "20", "22"] 13 | name: node-dev-base ${{ matrix.node }} images 14 | steps: 15 | - name: Check out the repository 16 | uses: actions/checkout@v2 17 | - name: Set up QEMU 18 | uses: docker/setup-qemu-action@v1 19 | - name: Set up Docker Buildx 20 | uses: docker/setup-buildx-action@v1 21 | with: 22 | install: true 23 | - name: Login to Docker Hub 24 | uses: docker/login-action@v1 25 | with: 26 | username: ${{ secrets.DOCKERHUB_USERNAME }} 27 | password: ${{ secrets.DOCKERHUB_TOKEN }} 28 | - name: Build nystudio107/node-dev-base:node-${{ matrix.node }}-alpine 29 | uses: docker/build-push-action@v2 30 | with: 31 | context: node-dev-base/node-${{ matrix.node }}-alpine 32 | file: node-dev-base/node-${{ matrix.node }}-alpine/Dockerfile 33 | push: true 34 | platforms: linux/amd64,linux/arm64 35 | tags: nystudio107/node-dev-base:${{ matrix.node }}-alpine 36 | build-args: | 37 | NODE_VERSION=${{ matrix.node }} 38 | build-php: 39 | runs-on: ubuntu-latest 40 | strategy: 41 | fail-fast: true 42 | matrix: 43 | php: ["8.0", "8.1", "8.2", "8.3", "8.4"] 44 | name: php-dev-base ${{ matrix.php }} images 45 | steps: 46 | - name: Check out the repository 47 | uses: actions/checkout@v2 48 | - name: Set up QEMU 49 | uses: docker/setup-qemu-action@v1 50 | - name: Set up Docker Buildx 51 | uses: docker/setup-buildx-action@v1 52 | with: 53 | install: true 54 | - name: Login to Docker Hub 55 | uses: docker/login-action@v1 56 | with: 57 | username: ${{ secrets.DOCKERHUB_USERNAME }} 58 | password: ${{ secrets.DOCKERHUB_TOKEN }} 59 | - name: Build nystudio107/php-prod-base:php-${{ matrix.php }}-alpine 60 | uses: docker/build-push-action@v2 61 | with: 62 | context: php-prod-base/php-${{ matrix.php }}-alpine 63 | file: php-prod-base/php-${{ matrix.php }}-alpine/Dockerfile 64 | push: true 65 | platforms: linux/amd64,linux/arm64 66 | tags: nystudio107/php-prod-base:${{ matrix.php }}-alpine 67 | build-args: | 68 | PHP_VERSION=${{ matrix.php }} 69 | - name: Build nystudio107/php-dev-base:php-${{ matrix.php }}-alpine 70 | uses: docker/build-push-action@v2 71 | with: 72 | context: php-dev-base/php-${{ matrix.php }}-alpine 73 | file: php-dev-base/php-${{ matrix.php }}-alpine/Dockerfile 74 | push: true 75 | platforms: linux/amd64,linux/arm64 76 | tags: nystudio107/php-dev-base:${{ matrix.php }}-alpine 77 | build-args: | 78 | PHP_VERSION=${{ matrix.php }} 79 | -------------------------------------------------------------------------------- /.github/workflows/build-docker-images.yml: -------------------------------------------------------------------------------- 1 | name: Build Docker Images 2 | on: 3 | push: 4 | branches: 5 | - develop 6 | workflow_dispatch: 7 | jobs: 8 | build-node: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | fail-fast: true 12 | matrix: 13 | node: ["16", "18", "20", "22"] 14 | name: node-dev-base ${{ matrix.node }} images 15 | steps: 16 | - name: Check out the repository 17 | uses: actions/checkout@v2 18 | - name: Set up QEMU 19 | uses: docker/setup-qemu-action@v1 20 | - name: Set up Docker Buildx 21 | uses: docker/setup-buildx-action@v1 22 | with: 23 | install: true 24 | - name: Login to Docker Hub 25 | uses: docker/login-action@v1 26 | with: 27 | username: ${{ secrets.DOCKERHUB_USERNAME }} 28 | password: ${{ secrets.DOCKERHUB_TOKEN }} 29 | - name: Build nystudio107/node-dev-base:node-${{ matrix.node }}-alpine 30 | uses: docker/build-push-action@v2 31 | with: 32 | context: node-dev-base/node-${{ matrix.node }}-alpine 33 | file: node-dev-base/node-${{ matrix.node }}-alpine/Dockerfile 34 | push: false 35 | platforms: linux/amd64,linux/arm64 36 | tags: nystudio107/node-dev-base:${{ matrix.node }}-alpine 37 | build-args: | 38 | NODE_VERSION=${{ matrix.node }} 39 | build-php: 40 | runs-on: ubuntu-latest 41 | strategy: 42 | fail-fast: true 43 | matrix: 44 | php: ["8.0", "8.1", "8.2", "8.3", "8.4"] 45 | name: php-dev-base ${{ matrix.php }} images 46 | steps: 47 | - name: Check out the repository 48 | uses: actions/checkout@v2 49 | - name: Set up QEMU 50 | uses: docker/setup-qemu-action@v1 51 | - name: Set up Docker Buildx 52 | uses: docker/setup-buildx-action@v1 53 | with: 54 | install: true 55 | - name: Login to Docker Hub 56 | uses: docker/login-action@v1 57 | with: 58 | username: ${{ secrets.DOCKERHUB_USERNAME }} 59 | password: ${{ secrets.DOCKERHUB_TOKEN }} 60 | - name: Build nystudio107/php-prod-base:php-${{ matrix.php }}-alpine 61 | uses: docker/build-push-action@v2 62 | with: 63 | context: php-prod-base/php-${{ matrix.php }}-alpine 64 | file: php-prod-base/php-${{ matrix.php }}-alpine/Dockerfile 65 | push: false 66 | platforms: linux/amd64,linux/arm64 67 | tags: nystudio107/php-prod-base:${{ matrix.php }}-alpine 68 | build-args: | 69 | PHP_VERSION=${{ matrix.php }} 70 | - name: Build nystudio107/php-dev-base:php-${{ matrix.php }}-alpine 71 | uses: docker/build-push-action@v2 72 | with: 73 | context: php-dev-base/php-${{ matrix.php }}-alpine 74 | file: php-dev-base/php-${{ matrix.php }}-alpine/Dockerfile 75 | push: false 76 | platforms: linux/amd64,linux/arm64 77 | tags: nystudio107/php-dev-base:${{ matrix.php }}-alpine 78 | build-args: | 79 | PHP_VERSION=${{ matrix.php }} 80 | -------------------------------------------------------------------------------- /docker-compose/craft-postgres/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | # nginx - web server 5 | nginx: 6 | build: 7 | context: ./docker-config/nginx 8 | dockerfile: ./Dockerfile 9 | env_file: &env 10 | - ./cms/.env 11 | init: true 12 | ports: 13 | - "8000:80" 14 | volumes: 15 | - cpresources:/var/www/project/cms/web/cpresources 16 | - ./cms/web:/var/www/project/cms/web:cached 17 | # php - run php-fpm 18 | php: 19 | build: &php-build 20 | context: ./docker-config/php-prod-craft 21 | dockerfile: ./Dockerfile 22 | depends_on: 23 | - "postgres" 24 | - "redis" 25 | env_file: 26 | *env 27 | expose: 28 | - "9000" 29 | init: true 30 | volumes: &php-volumes 31 | - cpresources:/var/www/project/cms/web/cpresources 32 | - storage:/var/www/project/cms/storage 33 | - ./cms:/var/www/project/cms:cached 34 | - ./cms/vendor:/var/www/project/cms/vendor:delegated 35 | - ./cms/storage/logs:/var/www/project/cms/storage/logs:delegated 36 | - ./cms/storage/runtime/compiled_templates:/var/www/project/cms/storage/runtime/compiled_templates:delegated 37 | # php - run php-fpm with xdebug 38 | php_xdebug: 39 | build: 40 | context: ./docker-config/php-dev-craft 41 | dockerfile: ./Dockerfile 42 | depends_on: 43 | - "php" 44 | env_file: 45 | *env 46 | expose: 47 | - "9000" 48 | init: true 49 | volumes: 50 | *php-volumes 51 | # queue - runs queue jobs via ./craft queue/listen 52 | queue: 53 | build: 54 | *php-build 55 | command: /var/www/project/run_queue.sh 56 | depends_on: 57 | - "php" 58 | env_file: 59 | *env 60 | init: true 61 | volumes: 62 | *php-volumes 63 | # postgres - database 64 | postgres: 65 | build: 66 | context: ./docker-config/postgres 67 | dockerfile: ./Dockerfile 68 | env_file: 69 | *env 70 | environment: 71 | POSTGRES_DB: project 72 | POSTGRES_USER: project 73 | POSTGRES_PASSWORD: project 74 | init: true 75 | ports: 76 | - "5432:5432" 77 | volumes: 78 | - db-data:/usr/local/pgsql/data 79 | # redis - key/value database for caching & php sessions 80 | redis: 81 | build: 82 | context: ./docker-config/redis 83 | dockerfile: ./Dockerfile 84 | expose: 85 | - "6379" 86 | init: true 87 | # webpack - frontend build system 88 | webpack: 89 | build: 90 | context: ./docker-config/node-dev-webpack 91 | dockerfile: ./Dockerfile 92 | env_file: 93 | *env 94 | init: true 95 | ports: 96 | - "8080:8080" 97 | volumes: 98 | - ./tsconfig.json:/var/www/project/tsconfig.json:cached 99 | - ./buildchain:/var/www/project/buildchain:cached 100 | - ./buildchain/node_modules:/var/www/project/buildchain/node_modules:delegated 101 | - ./cms/web/dist:/var/www/project/cms/web/dist:delegated 102 | - ./src:/var/www/project/src:cached 103 | - ./cms/templates:/var/www/project/cms/templates:cached 104 | 105 | volumes: 106 | db-data: 107 | cpresources: 108 | storage: 109 | -------------------------------------------------------------------------------- /docker-compose/craft-mysql/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | # nginx - web server 5 | nginx: 6 | build: 7 | context: ./docker-config/nginx 8 | dockerfile: ./Dockerfile 9 | env_file: &env 10 | - ./cms/.env 11 | init: true 12 | ports: 13 | - "8000:80" 14 | volumes: 15 | - cpresources:/var/www/project/cms/web/cpresources 16 | - ./cms/web:/var/www/project/cms/web:cached 17 | # php - run php-fpm 18 | php: 19 | build: &php-build 20 | context: ./docker-config/php-prod-craft 21 | dockerfile: ./Dockerfile 22 | depends_on: 23 | - "mysql" 24 | - "redis" 25 | env_file: 26 | *env 27 | expose: 28 | - "9000" 29 | init: true 30 | volumes: &php-volumes 31 | - cpresources:/var/www/project/cms/web/cpresources 32 | - storage:/var/www/project/cms/storage 33 | - ./cms:/var/www/project/cms:cached 34 | - ./cms/vendor:/var/www/project/cms/vendor:delegated 35 | - ./cms/storage/logs:/var/www/project/cms/storage/logs:delegated 36 | - ./cms/storage/runtime/compiled_templates:/var/www/project/cms/storage/runtime/compiled_templates:delegated 37 | # php - run php-fpm with xdebug 38 | php_xdebug: 39 | build: 40 | context: ./docker-config/php-dev-craft 41 | dockerfile: ./Dockerfile 42 | depends_on: 43 | - "php" 44 | env_file: 45 | *env 46 | expose: 47 | - "9000" 48 | init: true 49 | volumes: 50 | *php-volumes 51 | # queue - runs queue jobs via ./craft queue/listen 52 | queue: 53 | build: 54 | *php-build 55 | command: /var/www/project/run_queue.sh 56 | depends_on: 57 | - "php" 58 | env_file: 59 | *env 60 | init: true 61 | volumes: 62 | *php-volumes 63 | # mysql - database 64 | mysql: 65 | build: 66 | context: ./docker-config/mysql 67 | dockerfile: ./Dockerfile 68 | env_file: 69 | *env 70 | environment: 71 | MYSQL_ROOT_PASSWORD: secret 72 | MYSQL_DATABASE: project 73 | MYSQL_USER: project 74 | MYSQL_PASSWORD: project 75 | init: true 76 | ports: 77 | - "3306:3306" 78 | volumes: 79 | - db-data:/var/lib/mysql 80 | # redis - key/value database for caching & php sessions 81 | redis: 82 | build: 83 | context: ./docker-config/redis 84 | dockerfile: ./Dockerfile 85 | expose: 86 | - "6379" 87 | init: true 88 | # webpack - frontend build system 89 | webpack: 90 | build: 91 | context: ./docker-config/node-dev-webpack 92 | dockerfile: ./Dockerfile 93 | env_file: 94 | *env 95 | init: true 96 | ports: 97 | - "8080:8080" 98 | volumes: 99 | - ./tsconfig.json:/var/www/project/tsconfig.json:cached 100 | - ./buildchain:/var/www/project/buildchain:cached 101 | - ./buildchain/node_modules:/var/www/project/buildchain/node_modules:delegated 102 | - ./cms/web/dist:/var/www/project/cms/web/dist:delegated 103 | - ./src:/var/www/project/src:cached 104 | - ./cms/templates:/var/www/project/cms/templates:cached 105 | 106 | volumes: 107 | db-data: 108 | cpresources: 109 | storage: 110 | -------------------------------------------------------------------------------- /docker-compose/craft-mariadb/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | # nginx - web server 5 | nginx: 6 | build: 7 | context: ./docker-config/nginx 8 | dockerfile: ./Dockerfile 9 | env_file: &env 10 | - ./cms/.env 11 | init: true 12 | ports: 13 | - "8000:80" 14 | volumes: 15 | - cpresources:/var/www/project/cms/web/cpresources 16 | - ./cms/web:/var/www/project/cms/web:cached 17 | # php - run php-fpm 18 | php: 19 | build: &php-build 20 | context: ./docker-config/php-prod-craft 21 | dockerfile: ./Dockerfile 22 | depends_on: 23 | - "mariadb" 24 | - "redis" 25 | env_file: 26 | *env 27 | expose: 28 | - "9000" 29 | init: true 30 | volumes: &php-volumes 31 | - cpresources:/var/www/project/cms/web/cpresources 32 | - storage:/var/www/project/cms/storage 33 | - ./cms:/var/www/project/cms:cached 34 | - ./cms/vendor:/var/www/project/cms/vendor:delegated 35 | - ./cms/storage/logs:/var/www/project/cms/storage/logs:delegated 36 | - ./cms/storage/runtime/compiled_templates:/var/www/project/cms/storage/runtime/compiled_templates:delegated 37 | # php - run php-fpm with xdebug 38 | php_xdebug: 39 | build: 40 | context: ./docker-config/php-dev-craft 41 | dockerfile: ./Dockerfile 42 | depends_on: 43 | - "php" 44 | env_file: 45 | *env 46 | expose: 47 | - "9000" 48 | init: true 49 | volumes: 50 | *php-volumes 51 | # queue - runs queue jobs via ./craft queue/listen 52 | queue: 53 | build: 54 | *php-build 55 | command: /var/www/project/run_queue.sh 56 | depends_on: 57 | - "php" 58 | env_file: 59 | *env 60 | init: true 61 | volumes: 62 | *php-volumes 63 | # mariadb - database 64 | mariadb: 65 | build: 66 | context: ./docker-config/mariadb 67 | dockerfile: ./Dockerfile 68 | env_file: 69 | *env 70 | environment: 71 | MYSQL_ROOT_PASSWORD: secret 72 | MYSQL_DATABASE: project 73 | MYSQL_USER: project 74 | MYSQL_PASSWORD: project 75 | init: true 76 | ports: 77 | - "3306:3306" 78 | volumes: 79 | - db-data:/var/lib/mysql 80 | # redis - key/value database for caching & php sessions 81 | redis: 82 | build: 83 | context: ./docker-config/redis 84 | dockerfile: ./Dockerfile 85 | expose: 86 | - "6379" 87 | init: true 88 | # webpack - frontend build system 89 | webpack: 90 | build: 91 | context: ./docker-config/node-dev-webpack 92 | dockerfile: ./Dockerfile 93 | env_file: 94 | *env 95 | init: true 96 | ports: 97 | - "8080:8080" 98 | volumes: 99 | - ./tsconfig.json:/var/www/project/tsconfig.json:cached 100 | - ./buildchain:/var/www/project/buildchain:cached 101 | - ./buildchain/node_modules:/var/www/project/buildchain/node_modules:delegated 102 | - ./cms/web/dist:/var/www/project/cms/web/dist:delegated 103 | - ./src:/var/www/project/src:cached 104 | - ./cms/templates:/var/www/project/cms/templates:cached 105 | 106 | volumes: 107 | db-data: 108 | cpresources: 109 | storage: 110 | -------------------------------------------------------------------------------- /php-prod-base/php-8.0-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.0-fpm-alpine3.13 2 | 3 | # Install packages 4 | RUN set -eux; \ 5 | # Packages needed only for build 6 | apk add --no-cache --virtual .build-deps \ 7 | # Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image 8 | # These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) 9 | $PHPIZE_DEPS \ 10 | # Build deps 11 | autoconf \ 12 | dpkg-dev \ 13 | dpkg \ 14 | file \ 15 | g++ \ 16 | gcc \ 17 | libc-dev \ 18 | make \ 19 | pkgconf \ 20 | re2c \ 21 | libtool \ 22 | linux-headers \ 23 | wget \ 24 | && \ 25 | # Packages to install 26 | apk add --no-cache \ 27 | bzip2-dev \ 28 | ca-certificates \ 29 | curl \ 30 | fcgi \ 31 | freetype-dev \ 32 | gettext-dev \ 33 | gnu-libiconv \ 34 | icu-dev \ 35 | imagemagick \ 36 | imagemagick-dev \ 37 | libjpeg-turbo-dev \ 38 | libmcrypt-dev \ 39 | libpng \ 40 | libpng-dev \ 41 | libressl-dev \ 42 | libtool \ 43 | libwebp-dev \ 44 | libxml2-dev \ 45 | libzip-dev \ 46 | oniguruma-dev \ 47 | unzip \ 48 | && \ 49 | # pecl PHP extensions 50 | pecl install \ 51 | redis \ 52 | && \ 53 | # install imagick 54 | # use github version for now until release from https://pecl.php.net/get/imagick is ready for PHP 8 55 | # ref: https://github.com/Imagick/imagick/issues/358 56 | mkdir -p /usr/src/php/ext/imagick \ 57 | && \ 58 | curl -fsSL https://github.com/Imagick/imagick/archive/06116aa24b76edaf6b1693198f79e6c295eda8a9.tar.gz | tar xvz -C "/usr/src/php/ext/imagick" --strip 1 \ 59 | && \ 60 | # Configure PHP extensions 61 | docker-php-ext-configure \ 62 | # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 63 | gd --enable-gd --with-freetype --with-jpeg --with-webp \ 64 | && \ 65 | # Install PHP extensions 66 | docker-php-ext-install \ 67 | bcmath \ 68 | bz2 \ 69 | exif \ 70 | ftp \ 71 | gettext \ 72 | gd \ 73 | iconv \ 74 | intl \ 75 | imagick \ 76 | mbstring \ 77 | opcache \ 78 | pdo \ 79 | shmop \ 80 | sockets \ 81 | sysvmsg \ 82 | sysvsem \ 83 | sysvshm \ 84 | zip \ 85 | && \ 86 | # Enable PHP extensions 87 | docker-php-ext-enable \ 88 | imagick \ 89 | redis \ 90 | && \ 91 | # Remove the build deps 92 | apk del .build-deps \ 93 | && \ 94 | # Clean out directories that don't need to be part of the image 95 | rm -rf /tmp/* /var/tmp/* 96 | 97 | # https://github.com/docker-library/php/issues/1121 98 | ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php 99 | 100 | # Copy the `zzz-docker-php.ini` file into place for php 101 | COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ 102 | 103 | # Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm 104 | COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ 105 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # nystudio107/docker-images Change Log 2 | 3 | ## 1.2.26 - 2025.01.10 4 | ### Fix 5 | * Fix wrong base image for `php-prod-base:8.4-alpine` 6 | 7 | ## 1.2.25 - 2025.01.10 8 | ### Added 9 | * Added a `Makefile` for local building of the images 10 | * Add `node-22-alpine` image 11 | * Add `php-prod-base:8.3-alpine` image 12 | * Add `php-dev-base:8.3-alpine` image 13 | * Add `php-prod-base:8.4-alpine` image 14 | * Add `php-dev-base:8.4-alpine` image 15 | 16 | ### Changed 17 | * Remove `ENV PHPIZE_DEPS`, and use the environment variable inherited from the parent Alpine images rather than manually setting it ourselves 18 | 19 | ## 1.2.24 - 2023.11.26 20 | ### Changed 21 | * Removed `libressl` in favor of `openssl` to allow Postgres to work 22 | 23 | ## 1.2.23 - 2023.10.05 24 | ### Added 25 | * Switch `php-prod-base:8.2-alpine` from Alpine `3.17` to `3.18` 26 | 27 | ## 1.2.22 - 2023.07.22 28 | ### Added 29 | * Add `node-20-alpine` image 30 | 31 | ## 1.2.21 - 2023.07.19 32 | ### Added 33 | * Add `node-18-alpine` image 34 | * Add `php-prod-base:8.1-alpine` image 35 | * Add `php-dev-base:8.1-alpine` image 36 | * Add `php-prod-base:8.2-alpine` image 37 | * Add `php-dev-base:8.2-alpine` image 38 | 39 | ## 1.2.20 - 2021.11.24 40 | ### Added 41 | * Add `node-16-alpine` image 42 | 43 | ## 1.2.19 - 2021.08.02 44 | ### Added 45 | * Add trigger-based profiling for Xdebug 46 | 47 | ### Fixed 48 | * Fixed upstream issues with `libressl` by pinning to alpine3.13 (https://stackoverflow.com/questions/68013058/alpine3-14-docker-libtls-so-20-conflict) 49 | * Change from the specific version `gnu-libiconv=1.15-r3` to just `gnu-libiconv` 50 | 51 | ## 1.2.18 - 2021.06.26 52 | ### Changed 53 | * Continue running the `php-fpm` containers as root (since `php-fpm` uses worker pools with the proper user/group), but switch to `su-exec` to ensure any craft CLI commands are run as `www-data` 54 | 55 | ## 1.2.17 - 2021.06.15 56 | ### Fixed 57 | * Fixed typo in Dockerfile that would cause the PHP container to not build 58 | 59 | ## 1.2.16 - 2021.06.15 60 | ### Changed 61 | * Removed `USER` directive in the PHP containers, since the pool runs as `www-data` already 62 | * Fix permissions regression 63 | 64 | ## 1.2.15 - 2021.06.11 65 | ### Changed 66 | * Cleaned up the `php-dev-craft` & `php-prod-craft` Dockerfile file permissions 67 | 68 | ## 1.2.14 - 2021.06.11 69 | ### Added 70 | * Added GitHub actions for automated Docker image building & pushing 71 | 72 | ## 1.2.13 - 2021.05.24 73 | ### Changed 74 | * Use the `mysql/mysql-server:8.0` image for MySQL, which is the official image from Oracle and is M1 compataible (as well as a bit smaller) (https://github.com/docker-library/mysql/issues/318) 75 | 76 | ## 1.2.12 - 2021.05.23 77 | ### Changed 78 | * Run php container as the `www-data` user to avoid permissions issues 79 | 80 | ## 1.2.11 - 2021.03.29 81 | ### Added 82 | * Added support for webp to the GD PHP extension in `php-prod-base:8.0-alpine` & `php-prod-base:7.4-alpine` 83 | 84 | ## 1.2.10 - 2021.03.14 85 | ### Added 86 | * Added `14-alpine` image for `n`ode-dev-base` 87 | 88 | ## 1.2.9 - 2021.03.07 89 | ### Added 90 | * Added `docker-compose.yaml` & image for MySQL 8 91 | 92 | ### Changed 93 | * Use official MariaDB images 94 | 95 | ## 1.2.10 - 2021.03.14 96 | ### Added 97 | * Added `14-alpine` image for `node-dev-base` 98 | 99 | ## 1.2.9 - 2021.03.07 100 | ### Added 101 | * Added `docker-compose.yaml` & image for MySQL 8 102 | 103 | ### Changed 104 | * Use official MariaDB images 105 | 106 | ## 1.2.8 - 2021.02.19 107 | ### Added 108 | * Added `libjpeg-turbo-dev` to `node-dev-base:12-alpine` to allow ImageMin to work with Sharp 109 | 110 | ## 1.2.7 - 2021.02.09 111 | ### Fixed 112 | * Fixed iconv for Alpine 3.1.3 by pinning it to `gnu-libiconv=1.15r3` per: https://github.com/docker-library/php/issues/1121 113 | 114 | ## 1.2.6 - 2021.02.09 115 | ### Added 116 | * Added PHP 8.0 containers with JIT enabled for prod, and including Imagick for both dev & prod 117 | 118 | ## 1.2.5 - 2021.01.26 119 | ### Added 120 | * Added Docker bind mount for `compiled_templates` so XDebug can be used with Twig templates 121 | 122 | ## 1.2.4 - 2021.01.06 123 | ### Changed 124 | * Broke out the `php.ini` settings into `zzz-docker-php.ini` that we copy into place 125 | * Synced up the various settings that contribute to the maximum uploadable file size 126 | * Renamed `zzz-docker.cong` -> `zzz-docker-php-fpm.conf` to make what it's for more clear 127 | 128 | ## 1.2.3 - 2021.01.04 129 | ### Added 130 | * Added `node-dev-webpack` placeholder containers 131 | 132 | ## 1.2.2 - 2021.01.04 133 | ### Changed 134 | * `chown` the `cms/web` directory 135 | 136 | ## 1.2.1 - 2021.01.03 137 | ### Changed 138 | * Use `yobasystems/alpine-mariadb:10.4.15` for MariaDB 139 | 140 | ## 1.2.0 - 2021.01.03 141 | ### Added 142 | * Added significantly slimmer Alpine images for all containers with the `-alpine` tag 143 | * Added `redis` placeholder container 144 | * Added `mariadb` placeholder container 145 | * Added `postgres` placeholder container 146 | 147 | ### Changed 148 | * Added `--no-install-recommends` to all `apt-get install` commands 149 | 150 | ## 1.1.1 - 2020.12.22 151 | ### Changed 152 | * Have `php-dev-base` layer on top of `php-prod-base` 153 | 154 | ## 1.1.0 - 2020.12.21 155 | ### Added 156 | * Added `dh-autoreconf` to fix a [build issue](https://github.com/imagemin/imagemin-gifsicle/issues/37#issuecomment-578115789) with gifsicle 157 | * Added PHP 7.4 images for `php-dev-base` and `php-prod-base` 158 | 159 | ## 1.0.10 - 2020.12.01 160 | ### Added 161 | * Added `postgresql-client-12` to the postgres PHP containers to allow db backups to work 162 | 163 | ## 1.0.9 - 2020.11.25 164 | ### Changed 165 | * Change `mysql-client` to `mariadb-client` 166 | 167 | ## 1.0.8 - 2020.11.25 168 | ### Added 169 | * Add `mysql-client` in the `php-dev-craft` & `php-prod-craft` MariaDB containers so we get `mysqldump` 170 | 171 | ### Changed 172 | * Both MariaDB and Postgres `php-prod-craft` containers should use `FROM php-prod-base` 173 | 174 | ## 1.0.7 - 2020.11.20 175 | ### Added 176 | * Add `node-12` image 177 | 178 | ## 1.0.6 - 2020.11.17 179 | ### Fixed 180 | * Removed `xdebug.remote_connect_back` from the `php-dev-base` container's `xdebug.ini` file to allow xdebug to connect properly 181 | 182 | ## 1.0.5 - 2020.10.26 183 | ### Changed 184 | * Removed deprecated `links` from `docker-compose.yaml` 185 | * Use Composer 2.x 186 | 187 | ## 1.0.4 - 2020.10.26 188 | ### Changed 189 | * Use port `9003` for `xdebug` 190 | 191 | ## 1.0.3 - 2020.10.24 192 | ### Added 193 | * Added a `php_xdebug` container to speed up normal request by eliminating `xdebug` unless it's requested for via `XDEBUG_SESSION` cookie 194 | * Added Nginx container 195 | * Added `keep_alive.sh` script for the `queue` container 196 | 197 | ## 1.0.2 - 2020.09.09 198 | ### Added 199 | * Added a `queue` docker container to run queue jobs via `./craft queue/listen` 200 | 201 | ## 1.0.1 - 2020.09.08 202 | ### Added 203 | * Added image optimizers to the `php-dev-craft` Docker image 204 | 205 | ## 1.0.0 - 2020.06.01 206 | ### Added 207 | * Initial release 208 | --------------------------------------------------------------------------------