From 2fab33d4e4887d17a44b431f22cd20fa564dbbcc Mon Sep 17 00:00:00 2001 From: Vladimir Kirejko Date: Fri, 9 Dec 2016 21:13:04 +0200 Subject: [PATCH 01/22] Fix load of mongodb library ``` PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mongodb.so' - /usr/lib/php/20151012/mongodb.so: undefined symbol: php_json_serializable_ce in Unknown on line 0 ``` --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index bf97a8f..a301d08 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -125,7 +125,7 @@ ENV INSTALL_MONGO ${INSTALL_MONGO} RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension pecl install mongodb && \ - echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini \ + echo "extension=mongodb.so" >> /etc/php/7.0/cli/conf.d/30-mongodb.ini \ ;fi ##################################### From 19a2110b0670def34409472245452a34e7afc2c2 Mon Sep 17 00:00:00 2001 From: Jesus Baron Date: Sat, 10 Dec 2016 22:22:40 -0600 Subject: [PATCH 02/22] Fix typos and missing commas in docs --- CONTRIBUTING.md | 2 +- README.md | 64 ++++++++++++++++++++++++------------------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6cb9d4..9b98cfa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ Your contribution is more than welcome. Let's keep LaraDock amazing. ### Got a Question or Problem? -If you have questions about how to use LaraDock, please direct your questions to the discussion on [Gitter](https://gitter.im/LaraDock/laradock). If you beleave your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Question). +If you have questions about how to use LaraDock, please direct your questions to the discussion on [Gitter](https://gitter.im/LaraDock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Question). ### Found an Issue? If you find a bug in the source code or a mistake in the documentation, you can help us by diff --git a/README.md b/README.md index 5914037..9f24870 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Laradock is a Docker PHP development environment. It facilitate running **PHP** Apps on **Docker**. -Laradock is configured to run Laravel Apps by default, and it can be modifyed to run all kinds of PHP Apps (Symfony, Codeigniter, Wordpress, Drupal...). +Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, Wordpress, Drupal...). >Use Docker first and learn about it later. @@ -41,7 +41,7 @@ Laradock is configured to run Laravel Apps by default, and it can be modifyed to - [Change the PHP-FPM Version](#Change-the-PHP-FPM-Version) - [Change the PHP-CLI Version](#Change-the-PHP-CLI-Version) - [Install xDebug](#Install-xDebug) - - [Start/Stop xDebug](#Controll-xDebug) + - [Start/Stop xDebug](#Control-xDebug) - [Production](#Production) - [Prepare LaraDock for Production](#LaraDock-for-Production) - [Setup Laravel and Docker on Digital Ocean](#Digital-Ocean) @@ -53,8 +53,8 @@ Laradock is configured to run Laravel Apps by default, and it can be modifyed to - [Use phpMyAdmin](#Use-phpMyAdmin) - [Use pgAdmin](#Use-pgAdmin) - [Use ElasticSearch](#Use-ElasticSearch) - - [Codeigniter](#Codeigniter): - - [Install Codeigniter](#Install-Codeigniter) + - [CodeIgniter](#CodeIgniter): + - [Install CodeIgniter](#Install-CodeIgniter) - [Misc](#Misc) - [Change the timezone](#Change-the-timezone) - [Cron jobs](#CronJobs) @@ -393,7 +393,7 @@ If you need a special support. Contact me, more details in the [Help & Questions ```bash docker ps ``` -You can also use the this command if you want to see only this project containers: +You can also use the following command if you want to see only this project containers: ```bash docker-compose ps @@ -438,9 +438,9 @@ docker-compose down ### Enter a Container (run commands in a running Container) -1 - first list the current running containers with `docker ps` +1 - First list the current running containers with `docker ps` -2 - enter any container using: +2 - Enter any container using: ```bash docker-compose exec {container-name} bash @@ -452,7 +452,7 @@ docker-compose exec {container-name} bash docker-compose exec mysql bash ``` -3 - to exit a container, type `exit`. +3 - To exit a container, type `exit`. @@ -597,7 +597,7 @@ The PHP-CLI extensions should be installed in `workspace/Dockerfile`. ### Change the (PHP-FPM) Version By default **PHP-FPM 7.0** is running. ->The PHP-FPM is responsible of serving your application code, you don't have to change the PHP-CLI version if you are planing to run your application on different PHP-FPM version. +>The PHP-FPM is responsible of serving your application code, you don't have to change the PHP-CLI version if you are planning to run your application on different PHP-FPM version. #### A) Switch from PHP `7.0` to PHP `5.6` @@ -656,7 +656,7 @@ We do not natively support PHP 5.5 anymore, but you can get it in few steps: ### Change the PHP-CLI Version By default **PHP-CLI 7.0** is running. ->Note: it's not very essential to edit the PHP-CLI verion. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn't serve your Application code, this is the PHP-FPM job. +>Note: it's not very essential to edit the PHP-CLI version. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn't serve your Application code, this is the PHP-FPM job. The PHP-CLI is installed in the Workspace container. To change the PHP-CLI version you need to edit the `workspace/Dockerfile`. @@ -712,12 +712,12 @@ For information on how to configure xDebug with your IDE and work it out, check
- + ### Start/Stop xDebug: By installing xDebug, you are enabling it to run on startup by default. -To controll the behavior of xDebug (in the `php-fpm` Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose): +To control the behavior of xDebug (in the `php-fpm` Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose): - Stop xDebug from running by default: `./xdebugPhpFpm stop`. - Start xDebug by default: `./xdebugPhpFpm start`. @@ -737,7 +737,7 @@ To controll the behavior of xDebug (in the `php-fpm` Container), you can run the ### Prepare LaraDock for Production -It's recommended for production to create a custom `docker-compose.yml` file. For that reason LaraDock is shipped with `production-docker-compose.yml` which should contain only the containers you are planning to run on production (usage exampe: `docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...`). +It's recommended for production to create a custom `docker-compose.yml` file. For that reason, LaraDock is shipped with `production-docker-compose.yml` which should contain only the containers you are planning to run on production (usage exampe: `docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...`). Note: The Database (MySQL/MariaDB/...) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines: @@ -797,7 +797,7 @@ For more about the Laravel installation click [here](https://laravel.com/docs/ma 3 - Edit `docker-compose.yml` to Map the new application path: -By default LaraDock assumes the Laravel application is living in the parent directory of the laradock folder. +By default, LaraDock assumes the Laravel application is living in the parent directory of the laradock folder. Since the new Laravel application is in the `my-cool-app` folder, we need to replace `../:/var/www` with `../my-cool-app/:/var/www`, as follow: @@ -814,7 +814,7 @@ Since the new Laravel application is in the `my-cool-app` folder, we need to rep cd my-cool-app ``` -5 - Go back to the laraDock installation steps to see how to edit the `.env` file. +5 - Go back to the LaraDock installation steps to see how to edit the `.env` file. @@ -873,7 +873,7 @@ docker-compose up -d redis REDIS_HOST=redis ``` -If you don't find the `REDIS_HOST` variable in your `.env` file. Go to the database config file `config/database.php` and replace the default `127.0.0.1` IP with `redis` for Redis like this: +If you don't find the `REDIS_HOST` variable in your `.env` file. Go to the database configuration file `config/database.php` and replace the default `127.0.0.1` IP with `redis` for Redis like this: ```php 'redis' => [ @@ -953,7 +953,7 @@ docker-compose up -d mongo ``` -4 - Add the MongoDB configurations to the `config/database.php` config file: +4 - Add the MongoDB configurations to the `config/database.php` configuration file: ```php 'connections' => [ @@ -1065,15 +1065,15 @@ docker restart {container-name}
- +
- -### Install Codeigniter + +### Install CodeIgniter -To install Codeigniter 3 on Laradock all you have to do is the following simple steps: +To install CodeIgniter 3 on Laradock all you have to do is the following simple steps: 1 - Open the `docker-compose.yml` file. @@ -1175,7 +1175,7 @@ Modify the `mysql/my.cnf` file to set your port number, `1234` is used as an exa port=1234 ``` -If you need MySQL access from your host, do not forget to change the internal port number (`"3306:3306"` -> `"3306:1234"`) in the docker-compose config file. +If you need MySQL access from your host, do not forget to change the internal port number (`"3306:3306"` -> `"3306:1234"`) in the docker-compose configuration file. ### Use custom Domain (instead of the Docker IP) @@ -1191,7 +1191,7 @@ Assuming your custom domain is `laravel.dev` 2 - Open your browser and visit `{http://laravel.dev}` -Optionally you can define the server name in the nginx config file, like this: +Optionally you can define the server name in the nginx configuration file, like this: ```conf server_name laravel.dev; @@ -1205,9 +1205,9 @@ server_name laravel.dev; Enabling Global Composer Install during the build for the container allows you to get your composer requirements installed and available in the container after the build is done. -1 - open the `docker-compose.yml` file +1 - Open the `docker-compose.yml` file -2 - search for the `COMPOSER_GLOBAL_INSTALL` argument under the Workspace Container and set it to `true` +2 - Search for the `COMPOSER_GLOBAL_INSTALL` argument under the Workspace Container and set it to `true` It should be like this: @@ -1219,9 +1219,9 @@ It should be like this: - COMPOSER_GLOBAL_INSTALL=true ... ``` -3 - now add your dependencies to `workspace/composer.json` +3 - Now add your dependencies to `workspace/composer.json` -4 - rebuild the Workspace Container `docker-compose build workspace` +4 - Re-build the Workspace Container `docker-compose build workspace` @@ -1238,11 +1238,11 @@ Click on this [Enable Global Composer Build Install](#Enable-Global-Composer-Bui 2 - Add prestissimo as requirement in Composer: -a - now open the `workspace/composer.json` file +a - Now open the `workspace/composer.json` file -b - add `"hirak/prestissimo": "^0.3"` as requirement +b - Add `"hirak/prestissimo": "^0.3"` as requirement -c - rebuild the Workspace Container `docker-compose build workspace` +c - Re-build the Workspace Container `docker-compose build workspace` @@ -1378,7 +1378,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33 #### I get Mysql connection refused -This error is sometimes happens because your Laravel application isn't running on the container localhost IP (Which is 127.0.0.1). Steps to fix it: +This error sometimes happens because your Laravel application isn't running on the container localhost IP (Which is 127.0.0.1). Steps to fix it: * Option A 1. Check your running Laravel application IP by dumping `Request::ip()` variable using `dd(Request::ip())` anywhere on your application. The result is the IP of your Laravel container. @@ -1414,7 +1414,7 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
## Contributing -This little project was built by one man who has a full time job and many responsibilities, so if you like this project and you find that it needs a bug fix or support for new software or upgrade any container, or anything else.. Do not hesitate to contribute, you are more than welcome :) +This little project was built by one man who has a full time job and many responsibilities, so if you like this project and you find that it needs a bug fix or support for new software or upgrade any container, or anything else, do not hesitate to contribute, you are more than welcome :) #### Read the [Contribution Guidelines](https://github.com/LaraDock/laradock/blob/master/CONTRIBUTING.md). From e8ef7ab8c996bfd71d7e31b6f56c7270fdd20687 Mon Sep 17 00:00:00 2001 From: Joel Brubaker Date: Sun, 11 Dec 2016 14:41:10 -0800 Subject: [PATCH 03/22] Update Readme.md Very small grammar updates. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f24870..ebebe38 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ Most importantly Docker can run on Development and on Production (same environme > Laradock It's like Laravel Homestead but for Docker instead of Vagrant. -Laradock and [Homestead](https://laravel.com/docs/master/homestead) both gives you a complete virtual development environments. (Without the need to install and configure every single software on your own Operating System). +Laradock and [Homestead](https://laravel.com/docs/master/homestead) both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System). - Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine. From 8bacb129c6c470bae060b3c70135cc28af9205e4 Mon Sep 17 00:00:00 2001 From: Edmund Luong Date: Tue, 13 Dec 2016 20:00:48 -0500 Subject: [PATCH 04/22] Add option to install Google V8 Javascript Engine PHP extension --- docker-compose.yml | 1 + workspace/Dockerfile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9ecc41b..2c4a633 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,7 @@ services: - INSTALL_YARN=false - INSTALL_DRUSH=false - INSTALL_AEROSPIKE_EXTENSION=false + - INSTALL_V8JS_EXTENSION=false - COMPOSER_GLOBAL_INSTALL=false - INSTALL_WORKSPACE_SSH=false - PUID=1000 diff --git a/workspace/Dockerfile b/workspace/Dockerfile index a301d08..e1782b2 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -235,6 +235,23 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \ rm /etc/php/7.0/cli/conf.d/aerospike.ini \ ;fi +##################################### +# PHP V8JS: +##################################### +USER root + +ARG INSTALL_V8JS_EXTENSION=false +ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION} + +RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \ + # Install the php V8JS extension + add-apt-repository -y ppa:pinepain/libv8-5.4 \ + && apt-get update \ + && apt-get install -y php-dev php-pear libv8-5.4 \ + && pecl install v8js \ + && echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \ +;fi + ##################################### # Non-root user : PHPUnit path ##################################### From 6ffa36f188c4b4827baa9ca6abe11962b14ed3d9 Mon Sep 17 00:00:00 2001 From: Dmitry Pupinin Date: Thu, 15 Dec 2016 21:50:03 +0700 Subject: [PATCH 05/22] Fix mysql strict NO_ZERO_DATE --- mysql/my.cnf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/my.cnf b/mysql/my.cnf index 2983739..06595ca 100644 --- a/mysql/my.cnf +++ b/mysql/my.cnf @@ -6,4 +6,4 @@ [mysql] [mysqld] -sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" +sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" From da6b9506233d49eabed78ccc7b603330b2b088f7 Mon Sep 17 00:00:00 2001 From: Austin Benesh Date: Thu, 15 Dec 2016 12:13:27 -0700 Subject: [PATCH 06/22] Added SOAP option to php-fpm install. --- docker-compose.yml | 1 + php-fpm/Dockerfile-56 | 12 ++++++++++++ php-fpm/Dockerfile-70 | 12 ++++++++++++ 3 files changed, 25 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 2c4a633..d35f1cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,6 +45,7 @@ services: context: ./php-fpm args: - INSTALL_XDEBUG=false + - INSTALL_SOAP=false - INSTALL_MONGO=false - INSTALL_ZIP_ARCHIVE=false - INSTALL_MEMCACHED=false diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 1c81149..5b6928c 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -36,6 +36,18 @@ MAINTAINER Mahmoud Zalt # - INSTALL_ZIP_ARCHIVE=true # +##################################### +# SOAP: +##################################### + +ARG INSTALL_SOAP=false +RUN if [ ${INSTALL_SOAP} = true ]; then \ + # Install the soap extension + apt-get -y update && \ + apt-get -y install libxml2-dev && \ + docker-php-ext-install soap && \ +;fi + ##################################### # xDebug: ##################################### diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 2e87c57..820de4f 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -37,6 +37,18 @@ MAINTAINER Mahmoud Zalt # - ... # +##################################### +# SOAP: +##################################### + +ARG INSTALL_SOAP=false +RUN if [ ${INSTALL_SOAP} = true ]; then \ + # Install the soap extension + apt-get -y update && \ + apt-get -y install libxml2-dev && \ + docker-php-ext-install soap \ +;fi + ##################################### # xDebug: ##################################### From b8142222e582d94eceaa6d52e9d9b60b53e2f7c2 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 16 Dec 2016 09:36:08 +0800 Subject: [PATCH 07/22] Support specific version of yarn. Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 1 + workspace/Dockerfile | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d35f1cc..77cd00f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,7 @@ services: - PUID=1000 - PGID=1000 - NODE_VERSION=stable + - YARN_VERSION=latest - TZ=UTC volumes_from: - applications diff --git a/workspace/Dockerfile b/workspace/Dockerfile index e1782b2..3660514 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -189,10 +189,16 @@ USER laradock ARG INSTALL_YARN=false ENV INSTALL_YARN ${INSTALL_YARN} +ARG YARN_VERSION=latest +ENV YARN_VERSION ${YARN_VERSION} RUN if [ ${INSTALL_YARN} = true ]; then \ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \ - curl -o- -L https://yarnpkg.com/install.sh | bash && \ + if [ ${YARN_VERSION} = "latest" ]; then \ + curl -o- -L https://yarnpkg.com/install.sh | bash; \ + else \ + curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \ + fi && \ echo "" >> ~/.bashrc && \ echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \ ;fi From 380eef5fd954f3066ad0df6a6e613302ba0edf1a Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 16 Dec 2016 17:21:45 +0800 Subject: [PATCH 08/22] fix #490 duplication of key "volumes" Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d35f1cc..4b1c7d0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -261,14 +261,12 @@ services: caddy: build: ./caddy - volumes_from: - - applications - volumes: - - caddy:/root/.caddy ports: - "80:80" - "443:443" - "2015:2015" + volumes_from: + - applications volumes: - ./caddy/Caddyfile:/etc/Caddyfile - ./logs/caddy:/var/log/caddy From 97f882e4c7e60896408a138cd91705e7ede0cdf4 Mon Sep 17 00:00:00 2001 From: philtrep Date: Mon, 19 Dec 2016 10:40:36 -0500 Subject: [PATCH 09/22] Added related projects to docs --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index ebebe38..1ae0380 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Laradock is configured to run Laravel Apps by default, and it can be modified to - [Install Node + YARN](#Install-Yarn) - [Debugging](#debugging) - [Upgrading LaraDock](#upgrading-laradock) +- [Related Projects](#related-projects) - [Help & Questions](#Help) @@ -1418,9 +1419,24 @@ This little project was built by one man who has a full time job and many respon #### Read the [Contribution Guidelines](https://github.com/LaraDock/laradock/blob/master/CONTRIBUTING.md). +
+ +## Related Projects +LaraDock related projects: +* [LaraDock CLI](https://github.com/lorinlee/laradock-cli) by [LorinLee](https://github.com/lorinlee) +* [LaraDock Env](https://github.com/bagart/laradock_env) by [BAGArt](https://github.com/bagart) +* [Klaradock](https://github.com/poyhsiao/Klaradock) by [Kim Hsiao](https://github.com/poyhsiao) +* [Ansible Laradock Kubernetes](https://github.com/sifat-rahim/ansible-laradock-kubernetes) by [Sifat Rahim](https://github.com/sifat-rahim) +These Docker Compose projects have piqued our interest: +* [MageDock](https://github.com/ojhaujjwal/magedock) by [Ujjwal Ojha](https://github.com/ojhaujjwal) +* [RubyDev-Dock](https://github.com/scudelletti/rubydev-dock) by [Diogo Scudelletti](https://github.com/scudelletti) +* [NoDock](https://github.com/Osedea/nodock) by [Osedea](https://github.com/Osedea) +If you want your project listed here, please open an issue. + +
## Help & Questions From 5bb515751a04dd177fb202327c2066a09b71d8ea Mon Sep 17 00:00:00 2001 From: Cosmos Pham Date: Tue, 20 Dec 2016 13:20:53 +0700 Subject: [PATCH 10/22] Fix PHP 5.6 Dockerfile syntax error Syntax error: ";" unexpected --- php-fpm/Dockerfile-56 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 5b6928c..e533309 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -45,7 +45,7 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the soap extension apt-get -y update && \ apt-get -y install libxml2-dev && \ - docker-php-ext-install soap && \ + docker-php-ext-install soap \ ;fi ##################################### From 944639b248649ec78e6c0fd59f23665edb388d0d Mon Sep 17 00:00:00 2001 From: shukebeta Date: Wed, 21 Dec 2016 08:09:41 +0800 Subject: [PATCH 11/22] fix a important typo docker-compose build php => docker-compose build php-fpm --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ae0380..49cc5af 100644 --- a/README.md +++ b/README.md @@ -619,7 +619,7 @@ By default **PHP-FPM 7.0** is running. 4 - Finally rebuild the container ```bash -docker-compose build php +docker-compose build php-fpm ``` > For more details about the PHP base image, visit the [official PHP docker images](https://hub.docker.com/_/php/). From d76f9e7722a75008c1f8524a45ff1007e897a0a5 Mon Sep 17 00:00:00 2001 From: Juan Eugenio Abadie Date: Wed, 21 Dec 2016 10:16:32 -0300 Subject: [PATCH 12/22] Typo elasticsearch-pkugins -> elasticsearch-plugins --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b99f312..b13c995 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -306,7 +306,7 @@ services: build: ./elasticsearch volumes: - elasticsearch-data:/usr/share/elasticsearch/data - - elasticsearch-pkugins:/usr/share/elasticsearch/data + - elasticsearch-plugins:/usr/share/elasticsearch/data ports: - "9200:9200" - "9300:9300" @@ -338,7 +338,7 @@ volumes: driver: "local" elasticsearch-data: driver: "local" - elasticsearch-pkugins: + elasticsearch-plugins: driver: "local" sessions: ## nothing is connected to this (- ./data/sessions:/sessions) driver: "local" From 860af556e2de959ff2103d9af5d77f4858b7e835 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Wed, 21 Dec 2016 14:01:51 -0500 Subject: [PATCH 13/22] Support bcmath php extention on php-fpm and workspace (base image 1.3) Probably closes #453 --- docker-compose.yml | 1 + php-fpm/Dockerfile-56 | 10 ++++++++++ php-fpm/Dockerfile-70 | 10 ++++++++++ workspace/Dockerfile | 2 +- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b13c995..33ffd90 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,6 +49,7 @@ services: - INSTALL_SOAP=false - INSTALL_MONGO=false - INSTALL_ZIP_ARCHIVE=false + - INSTALL_BCMATH=true - INSTALL_MEMCACHED=false - INSTALL_OPCACHE=false - INSTALL_AEROSPIKE_EXTENSION=false diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index e533309..e012439 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -84,6 +84,16 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ docker-php-ext-enable zip \ ;fi +##################################### +# bcmath: +##################################### + +ARG INSTALL_BCMATH=false +RUN if [ ${INSTALL_BCMATH} = true ]; then \ + # Install the bcmath extension + docker-php-ext-install bcmath \ +;fi + ##################################### # PHP Memcached: ##################################### diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 820de4f..a00d627 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -85,6 +85,16 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ docker-php-ext-enable zip \ ;fi +##################################### +# bcmath: +##################################### + +ARG INSTALL_BCMATH=false +RUN if [ ${INSTALL_BCMATH} = true ]; then \ + # Install the bcmath extension + docker-php-ext-install bcmath \ +;fi + ##################################### # PHP Memcached: ##################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 3660514..be063c0 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -10,7 +10,7 @@ # https://hub.docker.com/r/laradock/workspace/tags/ # -FROM laradock/workspace:1.2 +FROM laradock/workspace:1.3 MAINTAINER Mahmoud Zalt From b10108a9b5c6ff0de86426ed594debd18fa4b011 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Wed, 21 Dec 2016 14:20:40 -0500 Subject: [PATCH 14/22] disable installing the bcmath by default disable installing the PHP bcmath extension by default on the php-fpm container --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 33ffd90..66933f1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,7 +49,7 @@ services: - INSTALL_SOAP=false - INSTALL_MONGO=false - INSTALL_ZIP_ARCHIVE=false - - INSTALL_BCMATH=true + - INSTALL_BCMATH=false - INSTALL_MEMCACHED=false - INSTALL_OPCACHE=false - INSTALL_AEROSPIKE_EXTENSION=false From f2db21f3395d2c011b67990fa882fdf44c97c537 Mon Sep 17 00:00:00 2001 From: Jonathan Martin Date: Thu, 22 Dec 2016 15:28:23 +0000 Subject: [PATCH 15/22] Add art alias for php artisan -- like homestead --- workspace/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 3660514..f23c456 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -267,7 +267,15 @@ USER laradock RUN echo "" >> ~/.bashrc && \ echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc + +##################################### +# Laravel Artisan Alias +##################################### +USER root +RUN echo "" >> ~/.bashrc && \ + echo 'alias art="php artisan"' >> ~/.bashrc + # #-------------------------------------------------------------------------- # Final Touch From 13bdfa119deddefa9a791eee4778a638f8f30c21 Mon Sep 17 00:00:00 2001 From: per3evere Date: Fri, 23 Dec 2016 13:35:45 +0800 Subject: [PATCH 16/22] Update Dockerfile Replace tab with 4 spaces. --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 7450d8e..b8f2c55 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -274,7 +274,7 @@ RUN echo "" >> ~/.bashrc && \ USER root RUN echo "" >> ~/.bashrc && \ - echo 'alias art="php artisan"' >> ~/.bashrc + echo 'alias art="php artisan"' >> ~/.bashrc # #-------------------------------------------------------------------------- From 33e8e91e4908aeb17ebf69e16f80304ed6bd0b37 Mon Sep 17 00:00:00 2001 From: Cristian Mello Date: Sun, 25 Dec 2016 15:38:25 -0200 Subject: [PATCH 17/22] Add Laravel Envoy (#510) Add laravel envoy --- README.md | 26 ++++++++++++++++++++++++++ docker-compose.yml | 1 + workspace/Dockerfile | 17 ++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49cc5af..7ebe60c 100644 --- a/README.md +++ b/README.md @@ -1330,6 +1330,32 @@ It should be like this: 2 - Re-build the containers `docker-compose build workspace php-fpm` +
+ +### Install Laravel Envoy (Envoy Task Runner) + +1 - Open the `docker-compose.yml` file +
+2 - Search for the `INSTALL_LARAVEL_ENVOY` argument under the Workspace Container +
+3 - Set it to `true` +
+ +It should be like this: + +```yml + workspace: + build: + context: ./workspace + args: + - INSTALL_LARAVEL_ENVOY=true + ... +``` + +4 - Re-build the containers `docker-compose build workspace` + +####[Laravel Envoy Documentation Here](https://laravel.com/docs/5.3/envoy) +
diff --git a/docker-compose.yml b/docker-compose.yml index 66933f1..3f70e59 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,7 @@ services: - INSTALL_V8JS_EXTENSION=false - COMPOSER_GLOBAL_INSTALL=false - INSTALL_WORKSPACE_SSH=false + - INSTALL_LARAVEL_ENVOY=false - PUID=1000 - PGID=1000 - NODE_VERSION=stable diff --git a/workspace/Dockerfile b/workspace/Dockerfile index b8f2c55..4a7bf1f 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -275,7 +275,22 @@ USER root RUN echo "" >> ~/.bashrc && \ echo 'alias art="php artisan"' >> ~/.bashrc - + +##################################### +# Laravel Envoy: +##################################### +USER laradock + +ARG INSTALL_LARAVEL_ENVOY=true +ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY} + +RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \ + # Install the Laravel Envoy + echo "" >> ~/.bashrc && \ + echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \ + && composer global require "laravel/envoy=~1.0" \ +;fi + # #-------------------------------------------------------------------------- # Final Touch From 0218ef6b9f26bbd8057aa70a552969b021edf3af Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 26 Dec 2016 10:30:14 +0800 Subject: [PATCH 18/22] remove tabs. --- workspace/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 4a7bf1f..c64ac77 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -46,7 +46,7 @@ ARG PUID=1000 ARG PGID=1000 RUN groupadd -g $PGID laradock && \ useradd -u $PUID -g laradock -m laradock - + ##################################### # Set Timezone ##################################### @@ -267,7 +267,7 @@ USER laradock RUN echo "" >> ~/.bashrc && \ echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc - + ##################################### # Laravel Artisan Alias ##################################### From 343a950adc5654e7acbd5e2291830c7f39ad5937 Mon Sep 17 00:00:00 2001 From: Cristian Mello Date: Mon, 26 Dec 2016 01:59:58 -0200 Subject: [PATCH 19/22] add rethink-db container --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- rethinkdb/Dockerfile | 11 +++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 rethinkdb/Dockerfile diff --git a/README.md b/README.md index 7ebe60c..58f591f 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red - MariaDB - MongoDB - Neo4j + - RethinkDB - **Cache Engines:** - Redis - Memcached @@ -139,7 +140,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red - Beanstalkd (+ Beanstalkd Console) - RabbitMQ (+ RabbitMQ Console) - **Tools:** - - Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, xDebug, Vim...) + - Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, xDebug, Envoy, Vim...) - PhpMyAdmin - PgAdmin - ElasticSearch @@ -1356,6 +1357,44 @@ It should be like this: ####[Laravel Envoy Documentation Here](https://laravel.com/docs/5.3/envoy) +
+ +### Use RethinkDB Container + +The RethinkDB is an open-source Database for Real-time Web ([RethinkDB](https://rethinkdb.com/)). +A package ([Laravel RethinkDB](https://github.com/duxet/laravel-rethinkdb)) is being developed and was released a version for Laravel 5.2 (experimental). + +1 - Run the RethinkDB Container (`rethinkdb`) with the `docker-compose up` command. + +```bash +docker-compose up -d rethinkdb +``` + +2 - Add the RethinkDB configurations to the `config/database.php` configuration file: + +```php +'connections' => [ + + 'rethinkdb' => [ + 'name' => 'rethinkdb', + 'driver' => 'rethinkdb', + 'host' => env('DB_HOST', 'rethinkdb'), + 'port' => env('DB_PORT', 28015), + 'database' => env('DB_DATABASE', 'test'), + ] + + // ... + +], +``` + +3 - Open your Laravel's `.env` file and update the following variables: + +- set the `DB_CONNECTION` to your `rethinkdb`. +- set the `DB_HOST` to `rethinkdb`. +- set the `DB_PORT` to `28015`. +- set the `DB_DATABASE` to `database`. +
@@ -1504,6 +1543,7 @@ For special help with Docker and/or Laravel, you can schedule a live call with t - [Matthew Tonkin Dunn](https://github.com/mattythebatty) (mattythebatty) - [Zhivitsa Kirill](https://github.com/zhikiri) (zhikiri) - [Benmag](https://github.com/benmag) +- [Cristian Mello](https://github.com/cristiancmello) (cristiancmello) **Other Contributors & Supporters:** diff --git a/rethinkdb/Dockerfile b/rethinkdb/Dockerfile new file mode 100644 index 0000000..f5cb295 --- /dev/null +++ b/rethinkdb/Dockerfile @@ -0,0 +1,11 @@ +FROM rethinkdb:latest + +MAINTAINER Cristian Mello + +VOLUME /data/rethinkdb_data + +RUN cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf + +CMD ["rethinkdb", "--bind", "all"] + +EXPOSE 8080 From f0eda439064a08cd7f2e23c36a25e9e292c4320a Mon Sep 17 00:00:00 2001 From: Cristian Mello Date: Mon, 26 Dec 2016 02:12:11 -0200 Subject: [PATCH 20/22] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58f591f..0bbf968 100644 --- a/README.md +++ b/README.md @@ -1370,7 +1370,9 @@ A package ([Laravel RethinkDB](https://github.com/duxet/laravel-rethinkdb)) is b docker-compose up -d rethinkdb ``` -2 - Add the RethinkDB configurations to the `config/database.php` configuration file: +2 - Access the RethinkDB Administration Console [http://localhost:8090/#tables](http://localhost:8090/#tables) for create a database called `database`. + +3 - Add the RethinkDB configurations to the `config/database.php` configuration file: ```php 'connections' => [ @@ -1388,7 +1390,7 @@ docker-compose up -d rethinkdb ], ``` -3 - Open your Laravel's `.env` file and update the following variables: +4 - Open your Laravel's `.env` file and update the following variables: - set the `DB_CONNECTION` to your `rethinkdb`. - set the `DB_HOST` to `rethinkdb`. From 1ce802f2cc34c379b318fdcac6ef2ae13d92aab6 Mon Sep 17 00:00:00 2001 From: Cristian Mello Date: Mon, 26 Dec 2016 12:38:50 -0200 Subject: [PATCH 21/22] Update docker-compose.yml --- docker-compose.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3f70e59..eec861e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -190,6 +190,15 @@ services: - "27017:27017" volumes: - mongo:/data/db + +### RethinkDB Container ####################################### + + rethinkdb: + build: ./rethinkdb + ports: + - "8090:8080" + volumes: + - rethinkdb:/data/rethinkdb_data ### Redis Container ######################################### @@ -332,6 +341,8 @@ volumes: driver: "local" mongo: driver: "local" + rethinkdb: + driver: "local" phpmyadmin: driver: "local" aerospike: From 1b8726458f3ab8edeaa24fe32c3791cd10fc4e47 Mon Sep 17 00:00:00 2001 From: Cosmos Pham Date: Tue, 27 Dec 2016 13:32:59 +0700 Subject: [PATCH 22/22] fix syntax in xdebugPhpFpm --- xdebugPhpFpm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdebugPhpFpm b/xdebugPhpFpm index d1e7513..5af6eac 100644 --- a/xdebugPhpFpm +++ b/xdebugPhpFpm @@ -4,7 +4,7 @@ # Grab full name of php-fpm container -PHP_FPM_CONTAINER=$(docker-compose ps | grep php-fpm | cut -d" " -f 1) +PHP_FPM_CONTAINER=$(docker-compose ps | grep php-fpm | cut -d " " -f 1) # Grab OS type