dimti
4 years ago
21 changed files with 321 additions and 112 deletions
-
24.env.example
-
17docker-compose.base.yml
-
58dockerfiles/php-fpm/php73.Dockerfile
-
58dockerfiles/php-fpm/php74.Dockerfile
-
4dockerfiles/php-fpm/xdebug.sh
-
33dockerfiles/workspace/workspace73.Dockerfile
-
33dockerfiles/workspace/workspace74.Dockerfile
-
3dockerfiles/workspace/xdebug.sh
-
35src/.env
-
53src/docker-compose.base.yml
-
35src/docker-compose.yml
-
33src/dockerfiles/php-fpm/php.base.Dockerfile
-
7src/dockerfiles/php-fpm/php73.Dockerfile
-
7src/dockerfiles/php-fpm/php74.Dockerfile
-
0src/dockerfiles/php-fpm/xdebug.ini
-
0src/dockerfiles/workspace/aliases.sh
-
0src/dockerfiles/workspace/composer.json
-
21src/dockerfiles/workspace/workspace.base.Dockerfile
-
6src/dockerfiles/workspace/workspace73.Dockerfile
-
6src/dockerfiles/workspace/workspace74.Dockerfile
-
0src/dockerfiles/workspace/xdebug.ini
@ -1,7 +1,55 @@ |
|||||
# syntax = edrevo/dockerfile-plus |
|
||||
FROM php:7.3-fpm |
|
||||
|
FROM dimti/php:7.3 |
||||
|
|
||||
INCLUDE+ ./php.base.Dockerfile |
|
||||
|
########################################################################### |
||||
|
# Redis and igbinary: |
||||
|
########################################################################### |
||||
|
|
||||
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \ |
|
||||
&& docker-php-ext-install -j$(nproc) gd |
|
||||
|
ARG INSTALL_REDIS=false |
||||
|
|
||||
|
COPY ./igbinary.ini /usr/local/etc/php/conf.d/igbinary.ini |
||||
|
|
||||
|
RUN if [ ${INSTALL_REDIS} = true ]; then \ |
||||
|
pecl install -a igbinary \ |
||||
|
&& docker-php-ext-enable igbinary \ |
||||
|
&& printf "yes\n" | pecl install redis \ |
||||
|
&& docker-php-ext-enable redis \ |
||||
|
;fi |
||||
|
|
||||
|
########################################################################### |
||||
|
# Pear Mail and Mail_Mime: |
||||
|
########################################################################### |
||||
|
|
||||
|
ARG INSTALL_PEAR_MAIL=false |
||||
|
|
||||
|
RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \ |
||||
|
pear install Mail && pear install Mail_Mime \ |
||||
|
;fi |
||||
|
|
||||
|
########################################################################### |
||||
|
# php.ini opts: |
||||
|
########################################################################### |
||||
|
|
||||
|
# https://github.com/php/php-src/blob/master/php.ini-development |
||||
|
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
ARG PHP_OPT_SHORT_OPEN_TAG=Off |
||||
|
RUN sed -i "s/^short_open_tag = .*/short_open_tag = $PHP_OPT_SHORT_OPEN_TAG/g" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
ARG PHP_OPT_MAX_EXECUTION_TIME=30 |
||||
|
RUN sed -i "s/^max_execution_time = .*/max_execution_time = $PHP_OPT_MAX_EXECUTION_TIME/g" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
ARG PHP_OPT_MEMORY_LIMIT=128M |
||||
|
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
ARG PHP_OPT_UPLOAD_MAX_FILESIZE=2M |
||||
|
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
########################################################################### |
||||
|
# Locales: |
||||
|
########################################################################### |
||||
|
|
||||
|
RUN apt update && \ |
||||
|
apt install -y locales && \ |
||||
|
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ |
||||
|
sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \ |
||||
|
locale-gen |
@ -1,7 +1,55 @@ |
|||||
# syntax = edrevo/dockerfile-plus |
|
||||
FROM php:7.4-fpm |
|
||||
|
FROM dimti/php:7.4 |
||||
|
|
||||
INCLUDE+ ./php.base.Dockerfile |
|
||||
|
########################################################################### |
||||
|
# Redis and igbinary: |
||||
|
########################################################################### |
||||
|
|
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ |
|
||||
&& docker-php-ext-install -j$(nproc) gd |
|
||||
|
ARG INSTALL_REDIS=false |
||||
|
|
||||
|
COPY ./igbinary.ini /usr/local/etc/php/conf.d/igbinary.ini |
||||
|
|
||||
|
RUN if [ ${INSTALL_REDIS} = true ]; then \ |
||||
|
pecl install -a igbinary \ |
||||
|
&& docker-php-ext-enable igbinary \ |
||||
|
&& printf "yes\n" | pecl install redis \ |
||||
|
&& docker-php-ext-enable redis \ |
||||
|
;fi |
||||
|
|
||||
|
########################################################################### |
||||
|
# Pear Mail and Mail_Mime: |
||||
|
########################################################################### |
||||
|
|
||||
|
ARG INSTALL_PEAR_MAIL=false |
||||
|
|
||||
|
RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \ |
||||
|
pear install Mail && pear install Mail_Mime \ |
||||
|
;fi |
||||
|
|
||||
|
########################################################################### |
||||
|
# php.ini opts: |
||||
|
########################################################################### |
||||
|
|
||||
|
# https://github.com/php/php-src/blob/master/php.ini-development |
||||
|
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
ARG PHP_OPT_SHORT_OPEN_TAG=Off |
||||
|
RUN sed -i "s/^short_open_tag = .*/short_open_tag = $PHP_OPT_SHORT_OPEN_TAG/g" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
ARG PHP_OPT_MAX_EXECUTION_TIME=30 |
||||
|
RUN sed -i "s/^max_execution_time = .*/max_execution_time = $PHP_OPT_MAX_EXECUTION_TIME/g" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
ARG PHP_OPT_MEMORY_LIMIT=128M |
||||
|
RUN sed -i "s/^memory_limit = .*/memory_limit = $PHP_OPT_MEMORY_LIMIT/g" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
ARG PHP_OPT_UPLOAD_MAX_FILESIZE=2M |
||||
|
RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MAX_FILESIZE/g" "$PHP_INI_DIR/php.ini" |
||||
|
|
||||
|
########################################################################### |
||||
|
# Locales: |
||||
|
########################################################################### |
||||
|
|
||||
|
RUN apt update && \ |
||||
|
apt install -y locales && \ |
||||
|
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ |
||||
|
sed -i 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \ |
||||
|
locale-gen |
@ -0,0 +1,35 @@ |
|||||
|
### WORKSPACE ############################################# |
||||
|
WORKSPACE_PUID=1000 |
||||
|
WORKSPACE_PGID=1000 |
||||
|
WORKSPACE_TIMEZONE=Europe/Moscow |
||||
|
WORKSPACE_INSTALL_SSH=true |
||||
|
WORKSPACE_INSTALL_MYSQL_CLIENT=true |
||||
|
WORKSPACE_INSTALL_PYTHON=true |
||||
|
WORKSPACE_INSTALL_FSWATCH=false |
||||
|
WORKSPACE_INSTALL_PING=true |
||||
|
WORKSPACE_INSTALL_S3_MINIO_CLIENT=true |
||||
|
WORKSPACE_COMPOSER_VERSION=1 |
||||
|
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true |
||||
|
WORKSPACE_COMPOSER_REPO_PACKAGIST= |
||||
|
WORKSPACE_INSTALL_XDEBUG=false |
||||
|
WORKSPACE_INSTALL_WP_CLI=true |
||||
|
WORKSPACE_INSTALL_NODE=true |
||||
|
WORKSPACE_NODE_VERSION=lts/dubnium |
||||
|
WORKSPACE_NPM_REGISTRY= |
||||
|
WORKSPACE_INSTALL_GULP=true |
||||
|
WORKSPACE_INSTALL_YARN=true |
||||
|
WORKSPACE_YARN_VERSION=latest |
||||
|
|
||||
|
### PHP-FPM ############################################# |
||||
|
INSTALL_XDEBUG=true |
||||
|
INSTALL_REDIS=true |
||||
|
INSTALL_ZIP=true |
||||
|
INSTALL_BZ2=true |
||||
|
INSTALL_INTL=true |
||||
|
INSTALL_PGSQL=true |
||||
|
INSTALL_BCMATH=true |
||||
|
PHP_OPT_SHORT_OPEN_TAG=On |
||||
|
PHP_OPT_MAX_EXECUTION_TIME=600 |
||||
|
PHP_OPT_MEMORY_LIMIT=500M |
||||
|
PHP_OPT_UPLOAD_MAX_FILESIZE=20M |
||||
|
|
@ -0,0 +1,53 @@ |
|||||
|
version: '3.6' |
||||
|
|
||||
|
services: |
||||
|
php-fpm: |
||||
|
build: |
||||
|
context: ./dockerfiles/php-fpm |
||||
|
args: |
||||
|
- INSTALL_XDEBUG=${INSTALL_XDEBUG} |
||||
|
- INSTALL_REDIS=${INSTALL_REDIS} |
||||
|
- INSTALL_ZIP=${INSTALL_ZIP} |
||||
|
- INSTALL_BZ2=${INSTALL_BZ2} |
||||
|
- INSTALL_INTL=${INSTALL_INTL} |
||||
|
- INSTALL_PGSQL=${INSTALL_PGSQL} |
||||
|
- INSTALL_BCMATH=${INSTALL_BCMATH} |
||||
|
- INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL} |
||||
|
- PHP_OPT_SHORT_OPEN_TAG=${PHP_OPT_SHORT_OPEN_TAG} |
||||
|
- PHP_OPT_MAX_EXECUTION_TIME=${PHP_OPT_MAX_EXECUTION_TIME} |
||||
|
- PHP_OPT_MEMORY_LIMIT=${PHP_OPT_MEMORY_LIMIT} |
||||
|
- PHP_OPT_UPLOAD_MAX_FILESIZE=${PHP_OPT_UPLOAD_MAX_FILESIZE} |
||||
|
restart: always |
||||
|
volumes: |
||||
|
- ${PROJECTS_DIR}:/usr/share/nginx/html |
||||
|
expose: |
||||
|
- 9000 |
||||
|
workspace: |
||||
|
build: |
||||
|
context: ./dockerfiles/workspace |
||||
|
args: |
||||
|
- PUID=${WORKSPACE_PUID} |
||||
|
- PGID=${WORKSPACE_PGID} |
||||
|
- TZ=${WORKSPACE_TIMEZONE} |
||||
|
- INSTALL_SSH=${WORKSPACE_INSTALL_SSH} |
||||
|
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT} |
||||
|
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON} |
||||
|
- INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH} |
||||
|
- INSTALL_PING=${WORKSPACE_INSTALL_PING} |
||||
|
- INSTALL_S3_MINIO_CLIENT=${WORKSPACE_INSTALL_S3_MINIO_CLIENT} |
||||
|
- COMPOSER_VERSION=${WORKSPACE_COMPOSER_VERSION} |
||||
|
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL} |
||||
|
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST} |
||||
|
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} |
||||
|
- INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI} |
||||
|
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE} |
||||
|
- NODE_VERSION=${WORKSPACE_NODE_VERSION} |
||||
|
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY} |
||||
|
- INSTALL_GULP=${WORKSPACE_INSTALL_GULP} |
||||
|
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN} |
||||
|
- YARN_VERSION=${WORKSPACE_YARN_VERSION} |
||||
|
restart: always |
||||
|
volumes: |
||||
|
- ${PROJECTS_DIR}:/var/www |
||||
|
extra_hosts: |
||||
|
- "dockerhost:${DOCKER_HOST_IP}" |
@ -0,0 +1,35 @@ |
|||||
|
version: '3.6' |
||||
|
|
||||
|
services: |
||||
|
php73: |
||||
|
extends: |
||||
|
file: docker-compose.base.yml |
||||
|
service: php-fpm |
||||
|
build: |
||||
|
dockerfile: php73.Dockerfile |
||||
|
php74: |
||||
|
extends: |
||||
|
file: docker-compose.base.yml |
||||
|
service: php-fpm |
||||
|
build: |
||||
|
dockerfile: php74.Dockerfile |
||||
|
workspace73: |
||||
|
extends: |
||||
|
file: docker-compose.base.yml |
||||
|
service: workspace |
||||
|
build: |
||||
|
dockerfile: workspace73.Dockerfile |
||||
|
workspace74: |
||||
|
extends: |
||||
|
file: docker-compose.base.yml |
||||
|
service: workspace |
||||
|
build: |
||||
|
dockerfile: workspace74.Dockerfile |
||||
|
|
||||
|
secrets: |
||||
|
user_ssh_key: |
||||
|
file: ~/.ssh/id_rsa |
||||
|
user_known_hosts: |
||||
|
file: ~/.ssh/known_hosts |
||||
|
composer_auth: |
||||
|
file: ~/.composer/auth.json |
@ -0,0 +1,7 @@ |
|||||
|
# syntax = edrevo/dockerfile-plus |
||||
|
FROM php:7.3-fpm |
||||
|
|
||||
|
INCLUDE+ ./php.base.Dockerfile |
||||
|
|
||||
|
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \ |
||||
|
&& docker-php-ext-install -j$(nproc) gd |
@ -0,0 +1,7 @@ |
|||||
|
# syntax = edrevo/dockerfile-plus |
||||
|
FROM php:7.4-fpm |
||||
|
|
||||
|
INCLUDE+ ./php.base.Dockerfile |
||||
|
|
||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ |
||||
|
&& docker-php-ext-install -j$(nproc) gd |
@ -0,0 +1,6 @@ |
|||||
|
# syntax = edrevo/dockerfile-plus |
||||
|
ARG PHP_VERSION=7.3 |
||||
|
|
||||
|
FROM laradock/workspace:latest-${PHP_VERSION} |
||||
|
|
||||
|
INCLUDE+ ./workspace.base.Dockerfile |
@ -0,0 +1,6 @@ |
|||||
|
# syntax = edrevo/dockerfile-plus |
||||
|
ARG PHP_VERSION=7.4 |
||||
|
|
||||
|
FROM laradock/workspace:latest-${PHP_VERSION} |
||||
|
|
||||
|
INCLUDE+ ./workspace.base.Dockerfile |
Write
Preview
Loading…
Cancel
Save
Reference in new issue