Compare commits

...

18 Commits

Author SHA1 Message Date
4ae9b30644 - disable numeric assets rewrite 2021-06-01 10:03:24 +03:00
e9596a7e11 mtsql.sh fix 2021-05-12 16:42:56 +03:00
5f1e9498c8 * simplify elastic container names
* turn on redis extension on workspace
2021-04-30 14:24:14 +03:00
ec31427cb7 * elastic main yml file to gitignore 2021-04-30 13:13:34 +03:00
3955c89a85 * pass INSTALL_REDIS env var 2021-04-30 09:43:11 +03:00
57ebccad04 * helper script use container-like launch logic 2021-04-27 16:40:09 +03:00
0609ced666 * fix path of composer auth 2021-04-22 20:44:57 +03:00
2a88fe11f2 * up docker-compose example 2021-04-19 21:37:02 +03:00
ff0b62ed49 * correctly pass secrets to workspace-containers
* update README
* helper-scripts with create symlinks helper and get composer auth github token helper
2021-04-19 14:01:33 +03:00
fb9e1c6f4f - remove rename php.ini-development from user space build
- temporary disable igbinary, because install not successfully completed with segmentation fault
* partition of tune opts semantically divided
- remove unused env-vars from docker compose base in src and user space builds
2021-04-15 22:26:34 +03:00
f68bf45fae * src for workspace & php build
* user images from src
2021-04-15 15:57:05 +03:00
e051d0100c * elastic use include
+ add secrets to example
2021-04-15 13:19:32 +03:00
29a58620f5 * additional php extension moved to php-version dependency dockerfile 2021-04-15 12:32:56 +03:00
cd422e4e6b * workspace base with minio 2021-04-15 12:20:13 +03:00
5720d9376b * bcmath install bash-syntax fix 2021-04-13 19:07:06 +03:00
f89b232d7b * correctly gd install for php7.4 with freetype, jpeg and webp 2021-04-13 17:09:20 +03:00
9f0f96a499 * rename php-fpm dockerfile to simple naming
* update docker-compose example with modified dockerfile name in php-fpm versions services
2021-04-13 17:03:58 +03:00
f3139e9716 * big pre-summer refactoring
+ introduce php7.4 and stay only php7.3 as max older version
+ workspace with php7.4 in future commits
2021-04-13 00:01:26 +03:00
56 changed files with 979 additions and 920 deletions

View File

@ -3,37 +3,18 @@ DOCKER_HOST_IP=172.20.0.1
PROJECTS_DIR=/home/youruser/PhpstormProjects
### WORKSPACE #############################################
WORKSPACE_PHP_VERSION=7.3
WORKSPACE_PUID=1000
WORKSPACE_PGID=1000
WORKSPACE_TIMEZONE=Europe/Moscow
WORKSPACE_COMPOSER_VERSION=1
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
WORKSPACE_COMPOSER_AUTH=false
WORKSPACE_COMPOSER_REPO_PACKAGIST=
WORKSPACE_INSTALL_WP_CLI=true
WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_SSH=true
WORKSPACE_SSH_PASSPHRAZE=RSfndC66KmuRPRtSXOEe
WORKSPACE_INSTALL_FSWATCH=false
WORKSPACE_INSTALL_NODE=true
WORKSPACE_NODE_VERSION=lts/dubnium
WORKSPACE_NPM_REGISTRY=
WORKSPACE_INSTALL_YARN=true
WORKSPACE_YARN_VERSION=latest
WORKSPACE_INSTALL_GULP=true
WORKSPACE_INSTALL_MYSQL_CLIENT=true
WORKSPACE_INSTALL_PING=true
WORKSPACE_INSTALL_PYTHON=true
### PHP-FPM #############################################
INSTALL_XDEBUG=true
INSTALL_REDIS=true
INSTALL_PEAR_MAIL=true
INSTALL_ZIP=true
INSTALL_BZ2=true
INSTALL_INTL=true
PHP_OPT_SHORT_OPEN_TAG=On
PHP_OPT_MAX_EXECUTION_TIME=600
PHP_OPT_MEMORY_LIMIT=500M
PHP_OPT_UPLOAD_MAX_FILESIZE=20M
### MINIO S3 #############################################
MINIO_ACCESS_KEY=s3.local
MINIO_SECRET_KEY=qbKTLqAumjYOYlCXCRk6

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
/.idea
/dockerfiles/ypt-encoder
/docker-compose.yml
/docker-compose.elastic.yml
/.env

89
README.md Normal file
View File

@ -0,0 +1,89 @@
## First
Create alias for `docker-compose` command.
`echo 'alias dc="docker-compose"' >> ~/.bash_aliases`
Also, you have might be needed include `~/.bash_aliases` in your `~/.bashrc` file.
Build all
`dc build`
## Second
Create usefully symlinks
`./create-symlinks.sh`
## Get composer auth token
If you do not have composer github auth.json file in `~/.composer` dir. You will need launch the helper-script:
`./get-composer-auth.sh`
## Before use and launch
You need copy `vhosts.conf.example` and edit this file - remove unused roots (or change to existing dirs).
Setup correctly nginx config.
You ready for up containers.
`dc up -d`
## Database dumps
Database dumps must be placement on `./hostfiles` directory.
## Bash scripts
After execute created symlinks, you have some enter-points for vulnerable popular tasks.
### Xdebug
For start debugging in php-fpm, also in workspace
`./start-xdebug.sh [74|73]` - `74` by default
For start debugging in php-fpm, also in workspace
`./stop-xdebug.sh` or `./stop-xdebug.sh 73` if you launch start with php-version 73
### Mysql
For import dumps from `hostfiles` directory you might be enter to mysql console:
`./mysql.sh`
Change you needed database and source to the `*.sql` dump.
`use mydatabase`
`source /hostfiles/mydatabase.sql`
Dump must be extracted before source in mysql-cli
### Workspace
For execute composer update|install or nodejs operations, also yarn, npm and all node-builds.
You might use `workspace`-container
For the enter to workspace container with php 7.4 you need launch usefully helper script in your home directory:
`./enter-to-workspace.sh`
For enter to `workspace` with php7.3 you need pass `73` container name suffix
`./enter-to-workspace.sh 73`
### Nginx
For restart `nginx` after some changes in nginx configuration, you might:
`./restart-nginx.sh`
## Src build need DOCKER_BUILDKIT
If you want build own workspace image. You need export environment variable
`export DOCKER_BUILDKIT=1`
more info https://github.com/edrevo/dockerfile-plus

View File

@ -1,4 +1,9 @@
#!/bin/bash
cd $HOME/structure
dbId=$(docker ps -q --filter name=db)
docker exec $dbId mysqldump -u root -p123456 $1 | pv > $2
CONTAINER=$(docker ps | grep db | awk '{print $1}')
if [[ -z "${CONTAINER}" ]]; then
echo "Unable to find container: db"
exit 1
fi
docker exec -ti ${CONTAINER} mysqldump -u root -p123456 $1 | pv > $2

View File

@ -1,3 +1,13 @@
#!/bin/bash
cd $HOME/structure
docker-compose exec workspace su laradock
PHP_VERSION=$1 # Without dot
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
if [[ -z "${CONTAINER}" ]]; then
echo "Unable to find container: workspace${PHP_VERSION}"
exit 1
fi
docker exec -ti ${CONTAINER} su laradock

View File

@ -1,3 +1,9 @@
#!/bin/bash
cd $HOME/structure
docker-compose exec db bash -c 'LANG=ru_RU.UTF-8 mysql -u root -p123456'
CONTAINER=$(docker ps | grep mariadb | awk '{print $1}')
if [[ -z "${CONTAINER}" ]]; then
echo "Unable to find container: db"
exit 1
fi
docker exec -ti ${CONTAINER} bash -c 'LANG=ru_RU.UTF-8 mysql -u root -p123456'

View File

@ -1,3 +1,9 @@
#!/bin/bash
cd $HOME/structure
./dockerfiles/php$1-fpm/xdebug.sh stop && cd
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
PHP_VERSION=$1 # Without dot
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
${DIR}/dockerfiles/php-fpm/xdebug.sh stop ${PHP_VERSION}
${DIR}/dockerfiles/workspace/xdebug.sh stop ${PHP_VERSION}

View File

@ -1,3 +1,9 @@
#!/bin/bash
cd $HOME/structure
docker-compose exec web nginx -s reload
CONTAINER=$(docker ps | grep nginx | awk '{print $1}')
if [[ -z "${CONTAINER}" ]]; then
echo "Unable to find container: nginx"
exit 1
fi
docker exec -ti ${CONTAINER} nginx -s reload

View File

@ -1,3 +1,9 @@
#!/bin/bash
cd $HOME/structure
./dockerfiles/php$1-fpm/xdebug.sh start && cd
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
PHP_VERSION=$1 # Without dot
if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
${DIR}/dockerfiles/php-fpm/xdebug.sh start ${PHP_VERSION}
${DIR}/dockerfiles/workspace/xdebug.sh start ${PHP_VERSION}

View File

@ -1,9 +1,9 @@
upstream fpm {
server php-fpm:9000;
upstream php73 {
server php73:9000;
}
upstream fpm7.1 {
server php7.1-fpm:9000;
upstream php74 {
server php74:9000;
}
map $http_host $root {
@ -20,7 +20,7 @@ server {
include includes.d/octobercms.conf;
include includes.d/staticfiles.conf;
location ~ ^/index.php {
fastcgi_pass fpm;
fastcgi_pass php74;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
@ -49,7 +49,7 @@ server {
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass fpm;
fastcgi_pass php73;
fastcgi_index index.php;
}
}

View File

@ -1,4 +1,4 @@
rewrite "^(.*)\.(\d{10})\.(css|js)$" $1.$3 break;
#rewrite "^(.*)\.(\d{10})\.(css|js)$" $1.$3 break;
location ~* \.(jpg|jpeg|gif|png|svg|ico)$ {
access_log off;
expires max;

8
create-symlinks.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
ln -s ${DIR}/bash/start-xdebug.sh ${HOME}/
ln -s ${DIR}/bash/quit-xdebug.sh ${HOME}/
ln -s ${DIR}/bash/restart-nginx.sh ${HOME}/
ln -s ${DIR}/bash/mysql.sh ${HOME}/
ln -s ${DIR}/bash/enter-to-workspace.sh ${HOME}/

85
docker-compose.base.yml Executable file
View File

@ -0,0 +1,85 @@
version: '3.6'
services:
nginx:
image: nginx
restart: always
networks:
default:
aliases:
- loc.10ballov
volumes:
- ${PROJECTS_DIR}:/usr/share/nginx/html
- ./config/nginx/conf.d:/etc/nginx/conf.d
- ./config/nginx/includes.d:/etc/nginx/includes.d
- ./log/nginx:/var/log/nginx
ports:
- "80:80"
- "443:443"
expose:
- 80
php-fpm:
build:
context: ./dockerfiles/php-fpm
args:
- INSTALL_REDIS=${INSTALL_REDIS}
- 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}
restart: always
volumes:
- ${PROJECTS_DIR}:/var/www
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
secrets:
- user_ssh_key
- user_known_hosts
- composer_auth
db:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
ports:
- "3306:3306"
pma:
image: phpmyadmin/phpmyadmin
restart: always
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: 123456
ports:
- "81:80"
redis:
image: redis
restart: always
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
volumes:
- ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
# Must be copied into main docker-compose yml-file
volumes:
database:
secrets:
user_ssh_key:
file: ~/.ssh/id_rsa
user_known_hosts:
file: ~/.ssh/known_hosts
composer_auth:
file: ~/.composer/auth.json

18
docker-compose.elastic.base.yml Executable file
View File

@ -0,0 +1,18 @@
version: '3.6'
services:
elastic:
build:
context: ./dockerfiles/elastic
restart: on-failure
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
expose:
- "9200"
- "9300"

View File

@ -0,0 +1,23 @@
version: '3.6'
services:
elastic732:
extends:
file: docker-compose.elastic.base.yml
service: elastic
build:
dockerfile: elastic732.Dockerfile
volumes:
- elastic732:/usr/share/elastic/data
elastic752:
extends:
file: docker-compose.elastic.base.yml
service: elastic
build:
dockerfile: elastic752.Dockerfile
volumes:
- elastic752:/usr/share/elastic/data
volumes:
elastic732:
elastic752:

10
docker-compose.minio.base.yml Executable file
View File

@ -0,0 +1,10 @@
version: '3.6'
services:
minio:
image: minio/minio:RELEASE.2020-06-12T00-06-19Z
restart: always
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
command: server /minio

12
docker-compose.minio.yml Executable file
View File

@ -0,0 +1,12 @@
version: '3.6'
services:
minio:
extends:
file: docker-compose.minio.base.yml
service: minio
volumes:
- minio:/minio
volumes:
minio:

29
docker-compose.postgres.yml Executable file
View File

@ -0,0 +1,29 @@
version: '3.6'
services:
dbpg:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: postgres
volumes:
- databasepg:/var/lib/postgresql/data
- ./hostfiles:/hostfiles
adminer:
image: adminer
restart: always
ports:
- 8080:8080
pgadmin:
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: info@wpstudio.ru
PGADMIN_DEFAULT_PASSWORD: postgres
ports:
- "83:80"
volumes:
- ./hostfiles/pgadmin:/var/lib/pgadmin
volumes:
databasepg:

18
docker-compose.sphinx.yml Executable file
View File

@ -0,0 +1,18 @@
version: '3.6'
services:
sphinx:
build: ./dockerfiles/sphinx
restart: always
depends_on:
- db
command: sh -c 'searchd -c /etc/sphinxsearch/sphinx.conf & sleep 10 && while true; do indexer --rotate --all; sleep 7200; done'
volumes:
- ./config/sphinx:/etc/sphinxsearch
- ./log/sphinx:/var/log/sphinxsearch
- sphinx:/var/lib/sphinx/data
expose:
- "9306"
volumes:
sphinx:

View File

@ -1,172 +1,66 @@
version: "2"
version: '3.6'
services:
web:
image: nginx
restart: always
networks:
default:
aliases:
- loc.10ballov
volumes:
- ${PROJECTS_DIR}:/usr/share/nginx/html
- ./config/nginx/conf.d:/etc/nginx/conf.d
- ./config/nginx/includes.d:/etc/nginx/includes.d
- ./log/nginx:/var/log/nginx
ports:
- "80:80"
- "443:443"
expose:
- 80
php-fpm:
nginx:
extends:
file: docker-compose.base.yml
service: nginx
php73:
extends:
file: docker-compose.base.yml
service: php-fpm
build:
context: ./dockerfiles/php-fpm
args:
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
- INSTALL_REDIS=${INSTALL_REDIS}
- INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
- INSTALL_ZIP=${INSTALL_ZIP}
- INSTALL_BZ2=${INSTALL_BZ2}
- INSTALL_INTL=${INSTALL_INTL}
- 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
- ./tmp/php-fpm:/tmp/profiling
expose:
- 9000
php7.1-fpm:
dockerfile: php73.Dockerfile
php74:
extends:
file: docker-compose.base.yml
service: php-fpm
build:
context: dockerfiles/php7.1-fpm
args:
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
- INSTALL_REDIS=${INSTALL_REDIS}
- INSTALL_PEAR_MAIL=${INSTALL_PEAR_MAIL}
- INSTALL_ZIP=${INSTALL_ZIP}
- INSTALL_BZ2=${INSTALL_BZ2}
- INSTALL_INTL=${INSTALL_INTL}
- 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:
dockerfile: php74.Dockerfile
workspace73:
extends:
file: docker-compose.base.yml
service: workspace
build:
context: ./dockerfiles/workspace
args:
- PHP_VERSION=${WORKSPACE_PHP_VERSION}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- TZ=${WORKSPACE_TIMEZONE}
- COMPOSER_VERSION=${WORKSPACE_COMPOSER_VERSION}
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
- COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
- INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_SSH=${WORKSPACE_INSTALL_SSH}
- SSH_PASSPHRAZE=${WORKSPACE_SSH_PASSPHRAZE}
- INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH}
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
- INSTALL_GULP=${WORKSPACE_INSTALL_GULP}
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
- INSTALL_PING=${WORKSPACE_INSTALL_PING}
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
restart: always
volumes:
- ${PROJECTS_DIR}:/var/www
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
sphinx:
build: ./dockerfiles/sphinx
restart: always
depends_on:
- db
command: sh -c 'searchd -c /etc/sphinxsearch/sphinx.conf & sleep 10 && while true; do indexer --rotate --all; sleep 7200; done'
volumes:
- /home/dimti/docker-compose-projects/structure/config/sphinx:/etc/sphinxsearch
- /home/dimti/docker-compose-projects/structure/data/sphinx:/var/lib/sphinx/data
- /home/dimti/docker-compose-projects/structure/log/sphinx:/var/log/sphinxsearch
expose:
- "9306"
dockerfile: workspace73.Dockerfile
workspace74:
extends:
file: docker-compose.base.yml
service: workspace
build:
dockerfile: workspace74.Dockerfile
db:
build: ./dockerfiles/db
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
extends:
file: docker-compose.base.yml
service: db
volumes:
- database:/var/lib/mysql
- ./hostfiles:/hostfiles
- ./config/mariadb:/etc/mysql/conf.d
- ./log/mariadb:/var/log/mariadb
ports:
- "3306:3306"
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: 123456
ports:
- "81:80"
dbpg:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: postgres
volumes:
- databasepg:/var/lib/postgresql/data
- /data/hostfiles:/hostfiles
adminer:
image: adminer
restart: always
ports:
- 8080:8080
pgadmin:
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: info@wpstudio.ru
PGADMIN_DEFAULT_PASSWORD: postgres
ports:
- "83:80"
volumes:
- /data/hostfiles/pgadmin:/var/lib/pgadmin
pma:
extends:
file: docker-compose.base.yml
service: pma
redis:
image: redis
restart: always
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
volumes:
- ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
restart: always
container_name: elasticsearch
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- esdata1:/usr/share/elasticsearch/data
expose:
- "9200"
- "9300"
extends:
file: docker-compose.base.yml
service: redis
redis-salvoterra:
extends:
file: docker-compose.base.yml
service: redis
restart: on-failure
redis-allislam:
extends:
file: docker-compose.base.yml
service: redis
volumes:
database:
esdata1:
secrets:
user_ssh_key:
file: ~/.ssh/id_rsa
user_known_hosts:
file: ~/.ssh/known_hosts
composer_auth:
file: ~/.config/composer/auth.json

View File

@ -0,0 +1 @@
RUN elasticsearch-plugin install analysis-icu

View File

@ -0,0 +1,5 @@
# syntax = edrevo/dockerfile-plus
FROM docker.elastic.co/elasticsearch/elasticsearch:7.3.2
#INCLUDE+ ./elastic.base.Dockerfile
RUN elasticsearch-plugin install analysis-icu

View File

@ -0,0 +1,5 @@
# syntax = edrevo/dockerfile-plus
FROM docker.elastic.co/elasticsearch/elasticsearch:7.5.2
#INCLUDE+ ./elastic.base.Dockerfile
RUN elasticsearch-plugin install analysis-icu

View File

@ -1,150 +0,0 @@
FROM php:7.3-fpm
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libwebp-dev \
&& docker-php-ext-install -j$(nproc) iconv \
&& 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 \
&& docker-php-ext-install mysqli \
&& docker-php-ext-enable mysqli
RUN apt-get update && docker-php-ext-install pdo pdo_mysql && docker-php-ext-enable pdo pdo_mysql
###########################################################################
# xDebug:
###########################################################################
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install xdebug-2.5.5; \
else \
pecl install xdebug; \
fi && \
docker-php-ext-enable xdebug && \
sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
;fi
# Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
###########################################################################
# Redis and igbinary:
###########################################################################
ARG INSTALL_REDIS=false
RUN if [ ${INSTALL_REDIS} = true ]; then \
pecl install igbinary \
&& pecl install -a redis \
&& docker-php-ext-enable igbinary redis \
;fi
###########################################################################
# Zip:
###########################################################################
ARG INSTALL_ZIP=false
RUN if [ ${INSTALL_ZIP} = true ]; then \
apt update && apt install -y libzip-dev \
&& docker-php-ext-install zip \
&& docker-php-ext-enable zip \
;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
###########################################################################
# BZ2 function:
###########################################################################
ARG INSTALL_BZ2=false
RUN if [ ${INSTALL_BZ2} = true ]; then \
apt update && apt install -y libbz2-ocaml-dev \
&& docker-php-ext-install bz2 \
&& docker-php-ext-enable bz2 \
;fi
###########################################################################
# INTL function:
###########################################################################
ARG INSTALL_INTL=false
RUN if [ ${INSTALL_INTL} = true ]; then \
apt update && apt install -y libicu-dev \
&& docker-php-ext-install intl \
&& docker-php-ext-enable intl \
;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"
###########################################################################
# Prepend nginx 502 on showing errors:
# @see https://stackoverflow.com/questions/55260221/laravel-php-7-3-nginx-502-upstream-prematurely-closed-fastcgi-stdout
###########################################################################
RUN sed -i "s/^log_limit = .*/log_limit = 1024/g" "$PHP_INI_DIR/../php-fpm.d/docker.conf"
###########################################################################
# BCMATH functions:
###########################################################################
RUN docker-php-ext-install bcmath && docker-php-ext-enable bcmath
###########################################################################
# GEOIP:
###########################################################################
RUN apt update \
&& apt install -y libgeoip-dev wget \
&& rm -rf /var/lib/apt/lists/* \
&& pecl install geoip-1.1.1 \
&& docker-php-ext-enable geoip
###########################################################################
# PGSQL:
###########################################################################
RUN apt-get update && apt install -y libpq-dev \
&& docker-php-ext-install pdo_pgsql && docker-php-ext-enable pdo_pgsql

View File

@ -0,0 +1,9 @@
; Load igbinary extension
;extension=igbinary.so
; Use igbinary as session serializer
session.serialize_handler=igbinary
; Enable or disable compacting of duplicate strings
; The default is On.
igbinary.compact_strings=On

View File

@ -0,0 +1,52 @@
FROM dimti/php:7.3
###########################################################################
# Redis and igbinary:
###########################################################################
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
###########################################################################
# Tune opts:
###########################################################################
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

View File

@ -0,0 +1,52 @@
FROM dimti/php:7.4
###########################################################################
# Redis and igbinary:
###########################################################################
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
###########################################################################
# Tune opts:
###########################################################################
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

View File

@ -2,10 +2,15 @@
# NOTE: At the moment, this has only been confirmed to work with PHP 7
PHP_VERSION=$2 # Without dot
# Grab full name of php-fpm container
PHP_FPM_CONTAINER=$(docker ps | grep php-fpm | awk '{print $1}')
PHP_FPM_CONTAINER=$(docker ps | grep php${PHP_VERSION} | awk '{print $1}')
if [[ -z "${PHP_FPM_CONTAINER}" ]]; then
echo "Unable to find php fpm container: php${PHP_VERSION}"
exit 1
fi
# Grab OS type
if [[ "$(uname)" == "Darwin" ]]; then
@ -80,7 +85,7 @@ xdebug_stop ()
}
case $@ in
case $1 in
stop|STOP)
xdebug_stop
;;
@ -94,7 +99,7 @@ case $@ in
echo "xDebug [Stop | Start | Status] in the ${PHP_FPM_CONTAINER} container."
echo "xDebug must have already been installed."
echo "Usage:"
echo " .php-fpm/xdebug stop|start|status"
echo " .php-fpm/xdebug.sh 73|74 stop|start|status"
esac

View File

@ -1,25 +0,0 @@
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
;xdebug.remote_host=dockerhost
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
xdebug.remote_autostart=0
xdebug.remote_enable=0
xdebug.cli_color=0
xdebug.profiler_enable=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=/tmp
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.var_display_max_depth=-1
xdebug.trace_enable_trigger=1
xdebug.trace_output_dir=/tmp
xdebug.trace_output_name="trace.%t"

View File

@ -1,101 +0,0 @@
#! /bin/bash
# NOTE: At the moment, this has only been confirmed to work with PHP 7
# Grab full name of php-fpm container
PHP_FPM_CONTAINER=$(docker ps | grep php7.1-fpm | awk '{print $1}')
# Grab OS type
if [[ "$(uname)" == "Darwin" ]]; then
OS_TYPE="OSX"
else
OS_TYPE=$(expr substr $(uname -s) 1 5)
fi
xdebug_status ()
{
echo 'xDebug status'
# If running on Windows, need to prepend with winpty :(
if [[ $OS_TYPE == "MINGW" ]]; then
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
else
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
fi
}
xdebug_start ()
{
echo 'Start xDebug'
# And uncomment line with xdebug extension, thus enabling it
ON_CMD="sed -i 's/^;zend_extension=/zend_extension=/g' \
/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
# If running on Windows, need to prepend with winpty :(
if [[ $OS_TYPE == "MINGW" ]]; then
winpty docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
docker restart $PHP_FPM_CONTAINER
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
else
docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
docker restart $PHP_FPM_CONTAINER
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
fi
}
xdebug_stop ()
{
echo 'Stop xDebug'
# Comment out xdebug extension line
OFF_CMD="sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
# If running on Windows, need to prepend with winpty :(
if [[ $OS_TYPE == "MINGW" ]]; then
# This is the equivalent of:
# winpty docker exec -it laradock_php-fpm_1 bash -c 'bla bla bla'
# Thanks to @michaelarnauts at https://github.com/docker/compose/issues/593
winpty docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}"
docker restart $PHP_FPM_CONTAINER
#docker-compose restart php-fpm
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
else
docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}"
# docker-compose restart php-fpm
docker restart $PHP_FPM_CONTAINER
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
fi
}
case $@ in
stop|STOP)
xdebug_stop
;;
start|START)
xdebug_start
;;
status|STATUS)
xdebug_status
;;
*)
echo "xDebug [Stop | Start | Status] in the ${PHP_FPM_CONTAINER} container."
echo "xDebug must have already been installed."
echo "Usage:"
echo " .php-fpm/xdebug stop|start|status"
esac
exit 1

View File

@ -1,104 +0,0 @@
FROM php:7.4-fpm
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libwebp-dev \
&& docker-php-ext-install -j$(nproc) iconv \
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install mysqli \
&& docker-php-ext-enable mysqli
RUN apt-get update && docker-php-ext-install pdo pdo_mysql && docker-php-ext-enable pdo pdo_mysql
###########################################################################
# xDebug:
###########################################################################
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install xdebug-2.5.5; \
else \
pecl install xdebug; \
fi && \
docker-php-ext-enable xdebug && \
sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
;fi
# Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
###########################################################################
# Zip:
###########################################################################
ARG INSTALL_ZIP=false
RUN if [ ${INSTALL_ZIP} = true ]; then \
apt update && apt install -y libzip-dev \
&& docker-php-ext-install zip \
&& docker-php-ext-enable zip \
;fi
###########################################################################
# BZ2 function:
###########################################################################
ARG INSTALL_BZ2=false
RUN if [ ${INSTALL_BZ2} = true ]; then \
apt update && apt install -y libbz2-ocaml-dev \
&& docker-php-ext-install bz2 \
&& docker-php-ext-enable bz2 \
;fi
###########################################################################
# INTL function:
###########################################################################
ARG INSTALL_INTL=false
RUN if [ ${INSTALL_INTL} = true ]; then \
apt update && apt install -y libicu-dev \
&& docker-php-ext-install intl \
&& docker-php-ext-enable intl \
;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"
###########################################################################
# Prepend nginx 502 on showing errors:
# @see https://stackoverflow.com/questions/55260221/laravel-php-7-3-nginx-502-upstream-prematurely-closed-fastcgi-stdout
###########################################################################
RUN sed -i "s/^log_limit = .*/log_limit = 1024/g" "$PHP_INI_DIR/../php-fpm.d/docker.conf"

View File

@ -1,25 +0,0 @@
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
;xdebug.remote_host=dockerhost
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
xdebug.remote_autostart=0
xdebug.remote_enable=0
xdebug.cli_color=0
xdebug.profiler_enable=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=/tmp
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.var_display_max_depth=-1
xdebug.trace_enable_trigger=1
xdebug.trace_output_dir=/tmp
xdebug.trace_output_name="trace.%t"

View File

@ -1,101 +0,0 @@
#! /bin/bash
# NOTE: At the moment, this has only been confirmed to work with PHP 7
# Grab full name of php-fpm container
PHP_FPM_CONTAINER=$(docker ps | grep php7.4-fpm | awk '{print $1}')
# Grab OS type
if [[ "$(uname)" == "Darwin" ]]; then
OS_TYPE="OSX"
else
OS_TYPE=$(expr substr $(uname -s) 1 5)
fi
xdebug_status ()
{
echo 'xDebug status'
# If running on Windows, need to prepend with winpty :(
if [[ $OS_TYPE == "MINGW" ]]; then
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
else
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
fi
}
xdebug_start ()
{
echo 'Start xDebug'
# And uncomment line with xdebug extension, thus enabling it
ON_CMD="sed -i 's/^;zend_extension=/zend_extension=/g' \
/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
# If running on Windows, need to prepend with winpty :(
if [[ $OS_TYPE == "MINGW" ]]; then
winpty docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
docker restart $PHP_FPM_CONTAINER
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
else
docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
docker restart $PHP_FPM_CONTAINER
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
fi
}
xdebug_stop ()
{
echo 'Stop xDebug'
# Comment out xdebug extension line
OFF_CMD="sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
# If running on Windows, need to prepend with winpty :(
if [[ $OS_TYPE == "MINGW" ]]; then
# This is the equivalent of:
# winpty docker exec -it laradock_php-fpm_1 bash -c 'bla bla bla'
# Thanks to @michaelarnauts at https://github.com/docker/compose/issues/593
winpty docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}"
docker restart $PHP_FPM_CONTAINER
#docker-compose restart php-fpm
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
else
docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}"
# docker-compose restart php-fpm
docker restart $PHP_FPM_CONTAINER
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
fi
}
case $@ in
stop|STOP)
xdebug_stop
;;
start|START)
xdebug_start
;;
status|STATUS)
xdebug_status
;;
*)
echo "xDebug [Stop | Start | Status] in the ${PHP_FPM_CONTAINER} container."
echo "xDebug must have already been installed."
echo "Usage:"
echo " .php-fpm/xdebug stop|start|status"
esac
exit 1

View File

@ -1,11 +0,0 @@
{
"http-basic": {
"repo.magento.com": {
"username": "",
"password": ""
}
},
"github-oauth": {
"github.com": "e12b92ef777d9cfdd43c95a557dce7ffe4ad4407"
}
}

View File

@ -1 +0,0 @@
* * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1

View File

@ -0,0 +1 @@
#* * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1

View File

@ -0,0 +1 @@
#* * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1

View File

@ -0,0 +1,12 @@
{
"version": "10",
"aliases": {
"local": {
"url": "http://minio:9000",
"accessKey": "s3.local",
"secretKey": "qbKTLqAumjYOYlCXCRk6",
"api": "S3v4",
"path": "auto"
}
}
}

View File

@ -0,0 +1,49 @@
FROM dimti/workspace:7.3
###########################################################################
# Laradock non-root user:
###########################################################################
ARG PUID=1000
ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
RUN usermod -u ${PUID} laradock && groupmod -g ${PGID} laradock
RUN chown -R ${PUID}:${PGID} /home/laradock
###########################################################################
# Set Timezone
###########################################################################
ARG TZ=Europe/Moscow
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
###########################################################################
# Additional PHP-extensions:
###########################################################################
RUN pecl install -a redis
RUN echo "extension=redis.so" > /etc/php/7.3/cli/conf.d/20-redis.ini
###########################################################################
# S3 config
###########################################################################
USER laradock
COPY ./minio/auth.json /home/laradock/.mc/config.json
###########################################################################
# Crontab
###########################################################################
USER root
COPY ./crontab73 /etc/cron.d
RUN chmod -R 644 /etc/cron.d

View File

@ -0,0 +1,50 @@
FROM dimti/workspace:7.4
###########################################################################
# Laradock non-root user:
###########################################################################
ARG PUID=1000
ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
RUN usermod -u ${PUID} laradock && groupmod -g ${PGID} laradock
RUN chown -R ${PUID}:${PGID} /home/laradock
###########################################################################
# Set Timezone
###########################################################################
ARG TZ=Europe/Moscow
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
###########################################################################
# Additional PHP-extensions:
###########################################################################
#RUN pecl install igbinary && pecl install -a redis
RUN pecl install -a redis
RUN echo "extension=redis.so" > /etc/php/7.4/cli/conf.d/20-redis.ini
###########################################################################
# S3 config
###########################################################################
USER laradock
COPY ./minio/auth.json /home/laradock/.mc/config.json
###########################################################################
# Crontab
###########################################################################
USER root
COPY ./crontab74 /etc/cron.d
RUN chmod -R 644 /etc/cron.d

View File

@ -2,10 +2,15 @@
# NOTE: At the moment, this has only been confirmed to work with PHP 7
PHP_VERSION=$2 # Without dot
# Grab full name of workspace container
WORKSPACE_CONTAINER=$(docker ps | grep workspace | awk '{print $1}')
WORKSPACE_CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
if [[ -z "${WORKSPACE_CONTAINER}" ]]; then
echo "Unable to find workspace container: workspace${PHP_VERSION}"
exit 1
fi
# Grab OS type
if [[ "$(uname)" == "Darwin" ]]; then
@ -80,7 +85,7 @@ xdebug_stop ()
}
case $@ in
case $1 in
stop|STOP)
xdebug_stop
;;

15
get-composer-auth.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
FILE=${HOME}/.config/composer/auth.json
if [[ -f "${FILE}" ]]; then
if [[ ! -z "$(cat $FILE | grep github)" ]]; then
exit 0
fi
fi
echo "Get token: https://github.com/settings/tokens/new?scopes=repo&description=Composer"
# user="USER INPUT"
read -p "Enter token: " TOKEN
composer config -g github-oauth.github.com ${TOKEN}

35
src/.env Normal file
View File

@ -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

41
src/docker-compose.base.yml Executable file
View File

@ -0,0 +1,41 @@
version: '3.6'
services:
php-fpm:
build:
context: ./dockerfiles/php-fpm
args:
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
- INSTALL_ZIP=${INSTALL_ZIP}
- INSTALL_BZ2=${INSTALL_BZ2}
- INSTALL_INTL=${INSTALL_INTL}
- INSTALL_PGSQL=${INSTALL_PGSQL}
- INSTALL_BCMATH=${INSTALL_BCMATH}
- 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}
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}

35
src/docker-compose.yml Executable file
View File

@ -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

View File

@ -1,21 +1,22 @@
FROM php:7.1-fpm
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libwebp-dev \
&& docker-php-ext-install -j$(nproc) iconv \
&& 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 \
&& docker-php-ext-install mysqli \
&& docker-php-ext-enable mysqli
RUN apt-get update && docker-php-ext-install pdo pdo_mysql && docker-php-ext-enable pdo pdo_mysql
RUN apt-get update && docker-php-ext-install pdo pdo_mysql \
&& docker-php-ext-enable pdo pdo_mysql
###########################################################################
# xDebug:
###########################################################################
# Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
@ -23,32 +24,12 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install xdebug-2.5.5; \
else \
pecl install xdebug; \
pecl install xdebug-2.9.8; \
fi && \
docker-php-ext-enable xdebug && \
sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
;fi
# Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
###########################################################################
# Redis and igbinary:
###########################################################################
ARG INSTALL_REDIS=false
RUN if [ ${INSTALL_REDIS} = true ]; then \
pecl install igbinary \
&& pecl install -a redis \
&& docker-php-ext-enable igbinary redis \
;fi
###########################################################################
# Zip:
###########################################################################
@ -62,17 +43,7 @@ RUN if [ ${INSTALL_ZIP} = true ]; then \
;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
###########################################################################
# BZ2 function:
# BZ2:
###########################################################################
ARG INSTALL_BZ2=false
@ -84,7 +55,7 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \
;fi
###########################################################################
# INTL function:
# INTL:
###########################################################################
ARG INSTALL_INTL=false
@ -96,28 +67,26 @@ RUN if [ ${INSTALL_INTL} = true ]; then \
;fi
###########################################################################
# php.ini opts:
# PGSQL:
###########################################################################
# 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 INSTALL_PGSQL=false
ARG PHP_OPT_SHORT_OPEN_TAG=Off
RUN if [ ${INSTALL_PGSQL} = true ]; then \
apt update && apt install -y libpq-dev \
&& docker-php-ext-install pgsql \
&& docker-php-ext-install pdo_pgsql \
;fi
RUN sed -i "s/^short_open_tag = .*/short_open_tag = $PHP_OPT_SHORT_OPEN_TAG/g" "$PHP_INI_DIR/php.ini"
###########################################################################
# BCMATH:
###########################################################################
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"
ARG INSTALL_BCMATH=false
RUN if [ ${INSTALL_BCMATH} = true ]; then \
docker-php-ext-install bcmath \
;fi
###########################################################################
# Prepend nginx 502 on showing errors:
@ -125,3 +94,37 @@ RUN sed -i "s/^upload_max_filesize = .*/upload_max_filesize = $PHP_OPT_UPLOAD_MA
###########################################################################
RUN sed -i "s/^log_limit = .*/log_limit = 1024/g" "$PHP_INI_DIR/../php-fpm.d/docker.conf"
###########################################################################
# 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"
###########################################################################
# Tune opts:
###########################################################################
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

View File

@ -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

View File

@ -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

View File

@ -11,13 +11,7 @@
#
# Note: Base Image name format {image-tag}-{php-version}
#
ARG PHP_VERSION
# FROM laradock/workspace:2.2-${PHP_VERSION}
FROM letsdockerize/laradock-workspace:2.4-${PHP_VERSION}
LABEL maintainer="WP Studio <info@wpstudio.ru>"
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
@ -108,6 +102,27 @@ RUN echo "" >> ~/.bashrc && \
echo "" >> ~/.bashrc
###########################################################################
# ssh:
###########################################################################
USER root
ARG INSTALL_SSH=false
ENV INSTALL_SSH ${INSTALL_SSH}
RUN if [ ${INSTALL_SSH} = true ]; then \
rm -f /etc/service/sshd/down \
;fi
USER laradock
RUN if [ ${INSTALL_SSH} = true ]; then \
mkdir -p ~/.ssh \
&& ln -s /run/secrets/user_ssh_key ~/.ssh/id_rsa \
&& ln -s /run/secrets/user_known_hosts ~/.ssh/known_hosts \
;fi
###########################################################################
# MySQL Client:
###########################################################################
@ -121,6 +136,61 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
;fi
###########################################################################
# PYTHON:
###########################################################################
USER root
ARG INSTALL_PYTHON=false
RUN if [ ${INSTALL_PYTHON} = true ]; then \
apt-get update && apt-get -y install python python-pip python-dev build-essential \
&& python -m pip install --upgrade "pip < 21.0" \
&& python -m pip install --upgrade virtualenv \
;fi
###########################################################################
# fswatch
###########################################################################
USER root
ARG INSTALL_FSWATCH=false
RUN if [ ${INSTALL_FSWATCH} = true ]; then \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 47FE03C1 \
&& add-apt-repository -y ppa:hadret/fswatch \
|| apt-get update -yqq \
&& apt-get -y install fswatch \
;fi
###########################################################################
# ping:
###########################################################################
USER root
ARG INSTALL_PING=false
RUN if [ ${INSTALL_PING} = true ]; then \
apt-get update -yqq && \
apt-get -y install inetutils-ping \
;fi
###########################################################################
# Install S3 minio client:
###########################################################################
USER root
ARG INSTALL_S3_MINIO_CLIENT=false
RUN if [ ${INSTALL_S3_MINIO_CLIENT} = true ]; then \
curl https://dl.min.io/client/mc/release/linux-amd64/mc > /usr/local/sbin/mc \
&& chmod +x /usr/local/sbin/mc \
; fi
###########################################################################
# Composer:
###########################################################################
@ -129,12 +199,11 @@ USER root
# Add the composer.json
COPY ./composer.json /home/laradock/.composer/composer.json
# Add the auth.json for magento 2 credentials
COPY ./auth.json /home/laradock/.composer/auth.json
# Make sure that ~/.composer belongs to laradock
RUN chown -R laradock:laradock /home/laradock/.composer
RUN ln -s /run/secrets/composer_auth /home/laradock/.composer/auth.json
# Export composer vendor path
RUN echo "" >> ~/.bashrc && \
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bashrc
@ -155,15 +224,6 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
composer global install \
;fi
# Check if auth file is disabled
ARG COMPOSER_AUTH=false
ENV COMPOSER_AUTH ${COMPOSER_AUTH}
RUN if [ ${COMPOSER_AUTH} = false ]; then \
# remove the file
rm /home/laradock/.composer/auth.json \
;fi
ARG COMPOSER_REPO_PACKAGIST
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
@ -192,69 +252,6 @@ RUN echo "" >> ~/.bashrc && \
RUN set -xe; php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}."
###########################################################################
# MySQL Client:
###########################################################################
USER root
ARG INSTALL_MYSQL_CLIENT=false
RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
apt-get update -yqq && \
apt-get -y install mysql-client \
;fi
###########################################################################
# ping:
###########################################################################
USER root
ARG INSTALL_PING=false
RUN if [ ${INSTALL_PING} = true ]; then \
apt-get update -yqq && \
apt-get -y install inetutils-ping \
;fi
###########################################################################
# PYTHON:
###########################################################################
ARG INSTALL_PYTHON=false
RUN if [ ${INSTALL_PYTHON} = true ]; then \
apt-get -y install python python-pip python-dev build-essential \
&& python -m pip install --upgrade "pip < 21.0" \
&& python -m pip install --upgrade virtualenv \
;fi
###########################################################################
# Crontab
###########################################################################
USER root
COPY ./crontab /etc/cron.d
RUN chmod -R 644 /etc/cron.d
###########################################################################
# WP CLI:
###########################################################################
# The command line interface for WordPress
USER root
ARG INSTALL_WP_CLI=false
RUN if [ ${INSTALL_WP_CLI} = true ]; then \
curl -fsSL -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | bash && \
chmod +x /usr/local/bin/wp \
;fi
###########################################################################
# xDebug:
###########################################################################
@ -276,55 +273,19 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${P
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini
###########################################################################
# WP CLI:
###########################################################################
###########################################################################
# Additional PHP-extensions:
###########################################################################
# The command line interface for WordPress
USER root
RUN pecl install igbinary \
&& pecl install -a redis
ARG INSTALL_WP_CLI=false
###########################################################################
# ssh:
###########################################################################
USER root
ARG INSTALL_SSH=false
ENV INSTALL_SSH ${INSTALL_SSH}
ARG SSH_PASSPHRAZE=
ENV SSH_PASSPHRAZE ${SSH_PASSPHRAZE}
RUN ssh-keygen -f /tmp/id_rsa -N '${SSH_PASSPHRAZE}'
RUN if [ ${INSTALL_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
&& rm -f /tmp/id_rsa* \
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
&& chmod 400 /root/.ssh/id_rsa \
&& cp -rf /root/.ssh /home/laradock \
&& chown -R laradock:laradock /home/laradock/.ssh \
;fi
###########################################################################
# fswatch
###########################################################################
USER root
ARG INSTALL_FSWATCH=false
RUN if [ ${INSTALL_FSWATCH} = true ]; then \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 47FE03C1 \
&& add-apt-repository -y ppa:hadret/fswatch \
|| apt-get update -yqq \
&& apt-get -y install fswatch \
RUN if [ ${INSTALL_WP_CLI} = true ]; then \
curl -fsSL -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | bash && \
chmod +x /usr/local/bin/wp \
;fi
###########################################################################
@ -413,12 +374,26 @@ RUN if [ ${NPM_REGISTRY} ]; then \
;fi
###########################################################################
# GULP:
###########################################################################
ARG INSTALL_GULP=false
ENV INSTALL_GULP ${INSTALL_GULP}
USER root
RUN if [ ${INSTALL_GULP} = true ]; then \
npm i -g gulp gulp-cli \
;fi
###########################################################################
# YARN:
###########################################################################
USER laradock
ARG INSTALL_YARN=false
ENV INSTALL_YARN ${INSTALL_YARN}
ARG YARN_VERSION=latest
ENV YARN_VERSION ${YARN_VERSION}
@ -445,19 +420,6 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
# Add PATH for YARN
ENV PATH $PATH:/home/laradock/.yarn/bin
###########################################################################
# GULP:
###########################################################################
ARG INSTALL_GULP=false
ENV INSTALL_GULP ${INSTALL_GULP}
USER root
RUN if [ ${INSTALL_GULP} = true ]; then \
npm i -g gulp gulp-cli \
;fi
#
#--------------------------------------------------------------------------
# Final Touch

View File

@ -0,0 +1,6 @@
# syntax = edrevo/dockerfile-plus
ARG PHP_VERSION=7.3
FROM laradock/workspace:latest-${PHP_VERSION}
INCLUDE+ ./workspace.base.Dockerfile

View File

@ -0,0 +1,6 @@
# syntax = edrevo/dockerfile-plus
ARG PHP_VERSION=7.4
FROM laradock/workspace:latest-${PHP_VERSION}
INCLUDE+ ./workspace.base.Dockerfile

6
uncreate-symlinks.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
rm ${HOME}/start-xdebug.sh
rm ${HOME}/quit-xdebug.sh
rm ${HOME}/restart-nginx.sh
rm ${HOME}/mysql.sh
rm ${HOME}/enter-to-workspace.sh