Compare commits

..

58 Commits

Author SHA1 Message Date
1962327de1 Corrects folder locations in which to run docker-compose commands for caddy (#1721) 2018-07-20 10:05:31 +08:00
d8b2b8c233 Add gitlab (#1683)
* Add gitlab
2018-07-18 21:20:43 +08:00
0f65c60a89 DockerFile update for improvement (#1568)
Docker file changes for image size improvements.
2018-07-18 21:17:49 +08:00
8624335f61 Update crontab to reference full PHP path (#1517)
Otherwise it doesn't work
2018-07-13 22:36:43 +08:00
7ef36daaba Fix run mongo-webui service get exit 1 (#1702) 2018-07-13 22:32:40 +08:00
4ce25e95b4 Added option to install the php calendar extension in php-fpm (#1672)
* Added option to install the php calendar extension in php-fpm
* Added section about installing php calendar extension in php-fpm
2018-07-13 18:31:13 +08:00
20b0181b6d Make PR Template Checkboxes Render Correctly (#1697) 2018-07-13 18:29:18 +08:00
dc234b9b28 Add Jupyterhub (#1686) 2018-07-13 11:35:46 +08:00
29483bab8c Add Ipython (#1685) 2018-07-13 11:33:41 +08:00
85c57a0b6f update postgresql init db example file (#1689) 2018-07-06 20:59:57 +08:00
2f996450e5 Add Redis webui (#1688)
* add redis webui
* Update env-example
* depends on redis
2018-07-06 20:57:29 +08:00
1823060c4b Add Mongo webui (#1687)
* add mongo webui
* update
* Update env-example
2018-07-06 20:54:44 +08:00
6fa2b75bb7 Getting Started documentation typo (#1590) 2018-07-01 20:22:25 +08:00
2ec23122e7 Update version pointer node (#1598) 2018-06-30 17:08:02 +08:00
a1e01ac19b Install phpdbg (#1612)
* Install phpdbg
* Change documentstion
2018-06-30 16:54:46 +08:00
eccc149f45 Fix current shell on root when installing svgo (#1644)
This fix the following errors:
/bin/sh: 13: /root/.bashrc: shopt: not found
/bin/sh: 21: /root/.bashrc: shopt: not found
/bin/sh: 103: /root/.bashrc: source: not found
2018-06-30 16:50:37 +08:00
9cb7624da7 bugfix: add 'networks' to 'docker-in-docker' (#1660)
I do not know why but the pull request https://github.com/laradock/laradock/pull/1655 has lost the 'networks' code. I'll try to insert it Insert again ;-)
2018-06-30 16:49:29 +08:00
cd1c56c1e2 Fix Laradock-Toolbox url (#1610) 2018-06-28 13:29:30 +08:00
9d42ea6b9d Update docker-compose.yml to add 'dind' (#1655)
Add 'dind' image to run docker-in-docker: issue https://github.com/laradock/laradock/issues/1653
2018-06-28 13:25:33 +08:00
b0bfa5f1d3 Add netdata for monitoring server (#1613)
* add netdata container
* update document
* update document each part separate with 6 * \n
* remove unuse file
2018-06-28 13:24:08 +08:00
dcf6b6d9ac Install of libpng16 library for fix react and react with material-ui application (#1625)
* Added commands in Workspace Dockerfile for installation of libpng with configurable env argument switch

* Updated documentation
2018-06-28 13:14:06 +08:00
1d9cbd7c75 fix: MySQL 8.0 removed NO_AUTO_CREATE_USER SQL mode, fixed #1492 (#1548) 2018-06-27 18:49:53 +08:00
fd56c4dcda Update VUE CLI to v3 (#1654) 2018-06-27 18:48:32 +08:00
0351cf531b Fix minor syntax issue that solves "[/bin/sh: 1: [: missing ]" error (#1649) 2018-06-27 18:47:42 +08:00
09e998b723 Fix missing apt-utils package (#1652) 2018-06-27 18:47:05 +08:00
06d0105514 Fix PHP zip extension installation warnings (#1648)
This fixes the following warnings when installing "zip" php extension:
configure: WARNING: ========================================================
configure: WARNING: Use of bundled libzip is deprecated and will be removed.
configure: WARNING: Some features such as encryption and bzip2 are not available.
configure: WARNING: Use system library and --with-libzip is recommended.
configure: WARNING: ========================================================
2018-06-27 18:46:27 +08:00
0cbc51bf72 php-fpm ini file rename to match volume config format. (#1646)
volumes:
  - ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
2018-06-25 23:03:23 +08:00
08dfc9f816 php-fpm, workspace when php5 support old mongo ext. (#1642) 2018-06-25 20:16:25 +08:00
b71f50bf83 Fix apt-get deprecated --force-yes flag & noninteractive if needed (#1640) 2018-06-24 23:19:49 +08:00
7d1dc66f77 Conditionally install npm tools (#1641) 2018-06-24 23:19:09 +08:00
f3c934222f Fix #1627, The POSTGRES_ENTRYPOINT_INITDB variable is not set. Defaulting to a blank string. (#1639) 2018-06-24 14:38:04 +08:00
a90865d67c Update nvm install instructions (#1638) 2018-06-24 10:02:21 +08:00
a0a5c85a54 Update deployer install instructions (#1637) 2018-06-24 10:01:58 +08:00
a807caa30a Update laravel envoy install instructions (#1636) 2018-06-24 10:01:30 +08:00
bc27e96337 Update aerospike installation instructions (#1635) 2018-06-24 10:00:52 +08:00
11912055ec Update global composer install instructions (#1634) 2018-06-24 10:00:19 +08:00
3509473b89 Update node & yarn install instructions (#1633) 2018-06-24 09:59:15 +08:00
5521f71428 Update mongo install instructions (#1632) 2018-06-24 09:48:20 +08:00
339d47f303 Update linuxbrew install instructions (#1631) 2018-06-24 09:47:13 +08:00
600a6154b4 Automate xdebug installation and simplify instructions (#1630) 2018-06-24 09:46:12 +08:00
4673ba7b31 Fix minor typos and clarify few documentation phrases (#1629) 2018-06-24 09:43:54 +08:00
154249a08f Merge pull request #1614 from ahkui/postgresql_init_db
add postgres init db
2018-06-22 19:41:58 +08:00
5bffd43b55 Merge pull request #1505 from Crease29/patch-1
Add COMPOSE_PROJECT_NAME to env-example
2018-06-22 19:34:33 +08:00
0e9d044c6f Merge pull request #1606 from ahkui/fix_workspace_no_nasm
fix #1607  workspace no nasm
2018-06-22 18:30:49 +08:00
21d203da73 Merge pull request #1617 from bestlong/php70-swoole-build-failed
Fix php7.0 swoole build failed.
2018-06-18 22:24:14 +08:00
a3cbfd71f5 Fix php7.0 swoole build failed. 2018-06-18 21:27:23 +08:00
33234fd3b5 Merge pull request #1615 from bestlong/php5-drush-segmentation-fault
Fix php5.6 workspace DRUSH "Segmentation fault (core dumped)" error.
2018-06-17 23:29:16 +08:00
f47e40b262 fix php5.6 DRUSH "Segmentation fault (core dumped)" error. 2018-06-17 23:20:18 +08:00
7199ae5a34 fix wrong example 2018-06-15 23:37:27 +08:00
6caa4c5fb9 fix wrong sql 2018-06-15 23:27:28 +08:00
3fceba0709 Merge pull request #1608 from elliotleelewis/master
Updated `Kibana` version to match `Elasticsearch` version
2018-06-15 22:22:21 +08:00
75b3fa499e no message 2018-06-15 15:30:45 +08:00
999118b674 update example 2018-06-15 15:27:37 +08:00
4b2c440146 add init database 2018-06-15 04:39:19 +08:00
a4d3f9bd77 Updated Kibana version to match Elasticsearch version 2018-06-12 15:20:14 +01:00
65444d39b6 fix workspace no nasm 2018-06-12 20:15:30 +08:00
ad1509dd62 Update docuumentation for COMPOSE_PROJECT_NAME 2018-04-25 08:38:43 +02:00
9ab84c5174 Add COMPOSE_PROJECT_NAME to env-example 2018-04-25 08:30:33 +02:00
36 changed files with 1117 additions and 256 deletions

View File

@ -2,6 +2,6 @@
##### I completed the 3 steps below: ##### I completed the 3 steps below:
- [] I've read the [Contribution Guide](http://laradock.io/contributing). - [ ] I've read the [Contribution Guide](http://laradock.io/contributing).
- [] I've updated the **documentation**. (refer to [this](http://laradock.io/contributing/#update-the-documentation-site) for how to do so). - [ ] I've updated the **documentation**. (refer to [this](http://laradock.io/contributing/#update-the-documentation-site) for how to do so).
- [] I enjoyed my time contributing and making developer's life easier :) - [ ] I enjoyed my time contributing and making developer's life easier :)

View File

@ -73,7 +73,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
* Add the environment variables to the `env-example` if you have any. * Add the environment variables to the `env-example` if you have any.
* **MOST IMPORTANTLY** updated the `Documentation`, add as much information. * **MOST IMPORTANTLY** update the `Documentation`, add as much information.
* Submit a Pull Request, to the `master` branch. * Submit a Pull Request, to the `master` branch.
@ -100,7 +100,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
* Search for the image in the [Docker Hub](https://hub.docker.com/search/) and find the source.. * Search for the image in the [Docker Hub](https://hub.docker.com/search/) and find the source..
*Most of the image in Laradock are offical images, these projects live in other repositories and maintainer by other orgnizations.* *Most of the image in Laradock are offical images, these projects live in other repositories and maintainer by other organizations.*
**Note:** Laradock has two base images for (`Workspace` and `php-fpm`, mainly made to speed up the build time on your machine. **Note:** Laradock has two base images for (`Workspace` and `php-fpm`, mainly made to speed up the build time on your machine.

View File

@ -7,6 +7,8 @@ weight: 3
<a name="List-current-running-Containers"></a> <a name="List-current-running-Containers"></a>
## List current running Containers ## List current running Containers
```bash ```bash
@ -134,6 +136,7 @@ More info on Containers rebuilding [here](#Build-Re-build-Containers).
<br> <br>
<a name="Build-Re-build-Containers"></a> <a name="Build-Re-build-Containers"></a>
## Build/Re-build Containers ## Build/Re-build Containers
@ -155,6 +158,7 @@ You might use the `--no-cache` option if you want full rebuilding (`docker-compo
<br> <br>
<a name="Add-Docker-Images"></a> <a name="Add-Docker-Images"></a>
## Add more Software (Docker Images) ## Add more Software (Docker Images)
@ -188,8 +192,6 @@ More [options](https://docs.docker.com/compose/reference/logs/)
<br> <br>
<a name="PHP"></a> <a name="PHP"></a>
@ -201,7 +203,7 @@ More [options](https://docs.docker.com/compose/reference/logs/)
<a name="Install-PHP-Extensions"></a> <a name="Install-PHP-Extensions"></a>
## Install PHP Extensions ## Install PHP Extensions
Before installing PHP extensions, you have to decide whether you need for the `FPM` or `CLI` because each lives on a different container, if you need it for both you have to edit both containers. Before installing PHP extensions, you have to decide first whether you need `FPM` or `CLI`, because each of them has it's own different container, if you need it for both, you have to edit both containers.
The PHP-FPM extensions should be installed in `php-fpm/Dockerfile-XX`. *(replace XX with your default PHP version number)*. The PHP-FPM extensions should be installed in `php-fpm/Dockerfile-XX`. *(replace XX with your default PHP version number)*.
<br> <br>
@ -243,6 +245,8 @@ docker-compose build php-fpm
<br> <br>
<a name="Change-the-PHP-CLI-Version"></a> <a name="Change-the-PHP-CLI-Version"></a>
## Change the PHP-CLI Version ## Change the PHP-CLI Version
@ -271,53 +275,50 @@ docker-compose build workspace
<br> <br>
<a name="Install-xDebug"></a> <a name="Install-xDebug"></a>
## Install xDebug ## Install xDebug
1 - First install `xDebug` in the Workspace and the PHP-FPM Containers: 1 - First install `xDebug` in the Workspace and the PHP-FPM Containers:
<br> <br>
a) open the `docker-compose.yml` file a) open the `.env` file
<br> <br>
b) search for the `INSTALL_XDEBUG` argument under the Workspace Container b) search for the `WORKSPACE_INSTALL_XDEBUG` argument under the Workspace Container
<br> <br>
c) set it to `true` c) set it to `true`
<br> <br>
d) search for the `INSTALL_XDEBUG` argument under the PHP-FPM Container d) search for the `PHP_FPM_INSTALL_XDEBUG` argument under the PHP-FPM Container
<br> <br>
e) set it to `true` e) set it to `true`
It should be like this: 2 - Re-build the containers `docker-compose build workspace php-fpm`
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_XDEBUG=true
...
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_XDEBUG=true
...
```
2 - Open `laradock/workspace/xdebug.ini` and `laradock/php-fpm/xdebug.ini` and enable at least the following configurations:
```
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=0
; NOTE: The dockerhost is your vEthernet (DockerNAT) IP
xdebug.remote_host=dockerhost
```
3 - Re-build the containers `docker-compose build workspace php-fpm`
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm. For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm.
<br>
<a name="Install-phpdbg"></a>
## Install phpdbg
Install `phpdbg` in the Workspace and the PHP-FPM Containers:
<br>
1 - Open the `.env`.
2 - Search for `WORKSPACE_INSTALL_PHPDBG`.
3 - Set value to `true`
4 - Do the same for `PHP_FPM_INSTALL_PHPDBG`
```dotenv
WORKSPACE_INSTALL_PHPDBG=true
```
```dotenv
PHP_FPM_INSTALL_PHPDBG=true
```
<a name="Setup remote debugging for PhpStorm on Linux"></a> <a name="Setup remote debugging for PhpStorm on Linux"></a>
## Setup remote debugging for PhpStorm on Linux ## Setup remote debugging for PhpStorm on Linux
@ -358,24 +359,13 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
<a name="Install-Deployer"></a> <a name="Install-Deployer"></a>
## Install Deployer (Deployment tool for PHP) ## Install Deployer (Deployment tool for PHP)
1 - Open the `docker-compose.yml` file 1 - Open the `.env` file
<br> <br>
2 - Search for the `INSTALL_DEPLOYER` argument under the Workspace Container 2 - Search for the `WORKSPACE_INSTALL_DEPLOYER` argument under the Workspace Container
<br> <br>
3 - Set it to `true` 3 - Set it to `true`
<br> <br>
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_DEPLOYER=true
...
```
4 - Re-build the containers `docker-compose build workspace` 4 - Re-build the containers `docker-compose build workspace`
[**Deployer Documentation Here**](https://deployer.org/docs) [**Deployer Documentation Here**](https://deployer.org/docs)
@ -384,6 +374,7 @@ It should be like this:
<br> <br>
<a name="Production"></a> <a name="Production"></a>
@ -422,35 +413,15 @@ To learn more about how Docker publishes ports, please read [this excellent post
<br>
<a name="Use-Jenkins"></a>
## Use Jenkins
1) Boot the container `docker-compose up -d jenkins`. To enter the container type `docker-compose exec jenkins bash`.
2) Go to `http://localhost:8090/` (if you didn't chanhed your default port mapping)
3) Authenticate from the web app.
- Default username is `admin`.
- Default password is `docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword`.
(To enter container as root type `docker-compose exec --user root jenkins bash`).
4) Install some plugins.
5) Create your first Admin user, or continue as Admin.
Note: to add user go to `http://localhost:8090/securityRealm/addUser` and to restart it from the web app visit `http://localhost:8090/restart`.
You may wanna change the default security configuration, so go to `http://localhost:8090/configureSecurity/` under Authorization and choosing "Anyone can do anything" or "Project-based Matrix Authorization Strategy" or anything else.
<br> <br>
<a name="Laravel"></a> <a name="Laravel"></a>
<a name="Install-Laravel"></a> <a name="Install-Laravel"></a>
## Install Laravel from a Docker Container ## Install Laravel from a Docker Container
@ -570,6 +541,52 @@ docker-compose up -d php-worker
<br>
<a name="Use-NetData"></a>
## Use NetData
1 - Run the NetData Container (`netdata`) with the `docker-compose up` command. Example:
```bash
docker-compose up -d netdata
```
2 - Open your browser and visit the localhost on port **19999**: `http://localhost:19999`
<br>
<a name="Use-Jenkins"></a>
## Use Jenkins
1) Boot the container `docker-compose up -d jenkins`. To enter the container type `docker-compose exec jenkins bash`.
2) Go to `http://localhost:8090/` (if you didn't chanhed your default port mapping)
3) Authenticate from the web app.
- Default username is `admin`.
- Default password is `docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword`.
(To enter container as root type `docker-compose exec --user root jenkins bash`).
4) Install some plugins.
5) Create your first Admin user, or continue as Admin.
Note: to add user go to `http://localhost:8090/securityRealm/addUser` and to restart it from the web app visit `http://localhost:8090/restart`.
You may wanna change the default security configuration, so go to `http://localhost:8090/configureSecurity/` under Authorization and choosing "Anyone can do anything" or "Project-based Matrix Authorization Strategy" or anything else.
<br> <br>
<a name="Use-Redis"></a> <a name="Use-Redis"></a>
## Use Redis ## Use Redis
@ -631,33 +648,16 @@ composer require predis/predis:^1.0
1 - First install `mongo` in the Workspace and the PHP-FPM Containers: 1 - First install `mongo` in the Workspace and the PHP-FPM Containers:
<br> <br>
a) open the `docker-compose.yml` file a) open the `.env` file
<br> <br>
b) search for the `INSTALL_MONGO` argument under the Workspace Container b) search for the `WORKSPACE_INSTALL_MONGO` argument under the Workspace Container
<br> <br>
c) set it to `true` c) set it to `true`
<br> <br>
d) search for the `INSTALL_MONGO` argument under the PHP-FPM Container d) search for the `PHP_FPM_INSTALL_MONGO` argument under the PHP-FPM Container
<br> <br>
e) set it to `true` e) set it to `true`
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_MONGO=true
...
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_MONGO=true
...
```
2 - Re-build the containers `docker-compose build workspace php-fpm` 2 - Re-build the containers `docker-compose build workspace php-fpm`
@ -739,6 +739,25 @@ docker-compose up -d mariadb phpmyadmin
<br>
<a name="Use-Gitlab"></a>
## Use Gitlab
1 - Run the Gitlab Container (`gitlab`) with the `docker-compose up` command. Example:
```bash
docker-compose up -d gitlab
```
2 - Open your browser and visit the localhost on port **8989**: `http://localhost:8989`
<br>
*Note: You may change GITLAB_DOMAIN_NAME to your own domain name like `http://gitlab.example.com` default is `http://localhost`*
<br> <br>
<a name="Use-Adminer"></a> <a name="Use-Adminer"></a>
## Use Adminer ## Use Adminer
@ -756,6 +775,8 @@ docker-compose up -d adminer
<br> <br>
<a name="Use-Portainer"></a> <a name="Use-Portainer"></a>
## Use Portainer ## Use Portainer
@ -772,6 +793,7 @@ docker-compose up -d portainer
<br> <br>
<a name="Use-pgAdmin"></a> <a name="Use-pgAdmin"></a>
## Use PgAdmin ## Use PgAdmin
@ -924,6 +946,10 @@ docker-compose up -d rethinkdb
- set the `DB_DATABASE` to `database`. - set the `DB_DATABASE` to `database`.
<br> <br>
<a name="Use-Minio"></a> <a name="Use-Minio"></a>
## Use Minio ## Use Minio
@ -956,6 +982,9 @@ docker-compose up -d minio
<br> <br>
<a name="Use-AWS"></a> <a name="Use-AWS"></a>
## Use AWS ## Use AWS
@ -971,7 +1000,10 @@ docker-compose up -d aws
3 - Access the aws container with `docker-compose exec aws bash` 3 - Access the aws container with `docker-compose exec aws bash`
4 - To start using eb cli inside the container, initiaze your project first by doing 'eb init'. Read the [aws eb cli](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html) docs for more details. 4 - To start using eb cli inside the container, initialize your project first by doing 'eb init'. Read the [aws eb cli](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html) docs for more details.
@ -989,7 +1021,10 @@ docker-compose up -d grafana
3 - Open your browser and visit the localhost on port **3000** at the following URL: `http://localhost:3000` 3 - Open your browser and visit the localhost on port **3000** at the following URL: `http://localhost:3000`
4 - Login using the credentials User = `admin` Passwort = `admin`. Change the password in the webinterface if you want to. 4 - Login using the credentials User = `admin`, Password = `admin`. Change the password in the web interface if you want to.
@ -1014,6 +1049,11 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple
3 - Re-build your PHP-FPM Container `docker-compose build php-fpm`. 3 - Re-build your PHP-FPM Container `docker-compose build php-fpm`.
<br>
<a name="Install-Symfony"></a> <a name="Install-Symfony"></a>
## Install Symfony ## Install Symfony
@ -1027,6 +1067,11 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple
5 - Visit `symfony.test` 5 - Visit `symfony.test`
<br> <br>
<a name="Misc"></a> <a name="Misc"></a>
## Miscellaneous ## Miscellaneous
@ -1110,6 +1155,11 @@ ssh -o PasswordAuthentication=no \
To login as root, replace laradock@locahost with root@localhost. To login as root, replace laradock@locahost with root@localhost.
<br> <br>
<a name="Change-the-MySQL-Version"></a> <a name="Change-the-MySQL-Version"></a>
## Change the (MySQL) Version ## Change the (MySQL) Version
@ -1164,6 +1214,7 @@ The default username and password for the root MySQL user are `root` and `root `
<br> <br>
<a name="Create-Multiple-Databases"></a> <a name="Create-Multiple-Databases"></a>
## Create Multiple Databases (MySQL) ## Create Multiple Databases (MySQL)
@ -1178,6 +1229,8 @@ GRANT ALL ON `your_db_1`.* TO 'mysql_user'@'%' ;
<br> <br>
<a name="Change-MySQL-port"></a> <a name="Change-MySQL-port"></a>
## Change MySQL port ## Change MySQL port
@ -1228,20 +1281,10 @@ server_name laravel.test;
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. 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 `.env` file
2 - Search for the `COMPOSER_GLOBAL_INSTALL` argument under the Workspace Container and set it to `true` 2 - Search for the `WORKSPACE_COMPOSER_GLOBAL_INSTALL` argument under the Workspace Container and set it to `true`
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- COMPOSER_GLOBAL_INSTALL=true
...
```
3 - Now add your dependencies to `workspace/composer.json` 3 - Now add your dependencies to `workspace/composer.json`
4 - Re-build the Workspace Container `docker-compose build workspace` 4 - Re-build the Workspace Container `docker-compose build workspace`
@ -1280,20 +1323,9 @@ c - Re-build the Workspace Container `docker-compose build workspace`
To install NVM and NodeJS in the Workspace container To install NVM and NodeJS in the Workspace container
1 - Open the `docker-compose.yml` file 1 - Open the `.env` file
2 - Search for the `INSTALL_NODE` argument under the Workspace Container and set it to `true` 2 - Search for the `WORKSPACE_INSTALL_NODE` argument under the Workspace Container and set it to `true`
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_NODE=true
...
```
3 - Re-build the container `docker-compose build workspace` 3 - Re-build the container `docker-compose build workspace`
@ -1308,21 +1340,61 @@ It should be like this:
Yarn is a new package manager for JavaScript. It is so faster than npm, which you can find [here](http://yarnpkg.com/en/compare).To install NodeJS and [Yarn](https://yarnpkg.com/) in the Workspace container: Yarn is a new package manager for JavaScript. It is so faster than npm, which you can find [here](http://yarnpkg.com/en/compare).To install NodeJS and [Yarn](https://yarnpkg.com/) in the Workspace container:
1 - Open the `docker-compose.yml` file 1 - Open the `.env` file
2 - Search for the `INSTALL_NODE` and `INSTALL_YARN` argument under the Workspace Container and set it to `true` 2 - Search for the `WORKSPACE_INSTALL_NODE` and `WORKSPACE_INSTALL_YARN` argument under the Workspace Container and set it to `true`
It should be like this: 3 - Re-build the container `docker-compose build workspace`
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_NODE=true <br>
- INSTALL_YARN=true <a name="Install-NPM-GULP"></a>
... ## Install NPM GULP toolkit
```
To install NPM GULP toolkit in the Workspace container
1 - Open the `.env` file
2 - Search for the `WORKSPACE_INSTALL_NPM_GULP` argument under the Workspace Container and set it to `true`
3 - Re-build the container `docker-compose build workspace`
<br>
<a name="Install-NPM-BOWER"></a>
## Install NPM BOWER package manager
To install NPM BOWER package manager in the Workspace container
1 - Open the `.env` file
2 - Search for the `WORKSPACE_INSTALL_NPM_BOWER` argument under the Workspace Container and set it to `true`
3 - Re-build the container `docker-compose build workspace`
<br>
<a name="Install-NPM-VUE-CLI"></a>
## Install NPM VUE CLI
To install NPM VUE CLI in the Workspace container
1 - Open the `.env` file
2 - Search for the `WORKSPACE_INSTALL_NPM_VUE_CLI` argument under the Workspace Container and set it to `true`
3 - Re-build the container `docker-compose build workspace` 3 - Re-build the container `docker-compose build workspace`
@ -1337,20 +1409,9 @@ It should be like this:
Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homebrew and can be found [here](http://linuxbrew.sh). To install Linuxbrew in the Workspace container: Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homebrew and can be found [here](http://linuxbrew.sh). To install Linuxbrew in the Workspace container:
1 - Open the `docker-compose.yml` file 1 - Open the `.env` file
2 - Search for the `INSTALL_LINUXBREW` argument under the Workspace Container and set it to `true` 2 - Search for the `WORKSPACE_INSTALL_LINUXBREW` argument under the Workspace Container and set it to `true`
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_LINUXBREW=true
...
```
3 - Re-build the container `docker-compose build workspace` 3 - Re-build the container `docker-compose build workspace`
@ -1358,6 +1419,7 @@ It should be like this:
<br> <br>
<a name="Common-Aliases"></a> <a name="Common-Aliases"></a>
<br> <br>
@ -1370,38 +1432,23 @@ You are free to modify the `aliases.sh` as you see fit, adding your own aliases
<br> <br>
<a name="Install-Aerospike-Extension"></a> <a name="Install-Aerospike-Extension"></a>
## Install Aerospike extension ## Install Aerospike extension
1 - First install `aerospike` in the Workspace and the PHP-FPM Containers: 1 - First install `aerospike` in the Workspace and the PHP-FPM Containers:
<br> <br>
a) open the `docker-compose.yml` file a) open the `.env` file
<br> <br>
b) search for the `INSTALL_AEROSPIKE` argument under the Workspace Container b) search for the `WORKSPACE_INSTALL_AEROSPIKE` argument under the Workspace Container
<br> <br>
c) set it to `true` c) set it to `true`
<br> <br>
d) search for the `INSTALL_AEROSPIKE` argument under the PHP-FPM Container d) search for the `PHP_FPM_INSTALL_AEROSPIKE` argument under the PHP-FPM Container
<br> <br>
e) set it to `true` e) set it to `true`
<br>
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_AEROSPIKE=true
...
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_AEROSPIKE=true
...
```
2 - Re-build the containers `docker-compose build workspace php-fpm` 2 - Re-build the containers `docker-compose build workspace php-fpm`
@ -1414,24 +1461,13 @@ It should be like this:
<a name="Install-Laravel-Envoy"></a> <a name="Install-Laravel-Envoy"></a>
## Install Laravel Envoy (Envoy Task Runner) ## Install Laravel Envoy (Envoy Task Runner)
1 - Open the `docker-compose.yml` file 1 - Open the `.env` file
<br> <br>
2 - Search for the `INSTALL_LARAVEL_ENVOY` argument under the Workspace Container 2 - Search for the `WORKSPACE_INSTALL_LARAVEL_ENVOY` argument under the Workspace Container
<br> <br>
3 - Set it to `true` 3 - Set it to `true`
<br> <br>
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_LARAVEL_ENVOY=true
...
```
4 - Re-build the containers `docker-compose build workspace` 4 - Re-build the containers `docker-compose build workspace`
[**Laravel Envoy Documentation Here**](https://laravel.com/docs/5.3/envoy) [**Laravel Envoy Documentation Here**](https://laravel.com/docs/5.3/envoy)
@ -1439,6 +1475,18 @@ It should be like this:
<a name="Install php calendar extension"></a>
## Install php calendar extension
1 - Open the `.env` file
<br>
2 - Search for the `PHP_FPM_INSTALL_CALENDAR` argument under the PHP-FPM container
<br>
3 - Set it to `true`
<br>
4 - Re-build the containers `docker-compose build php-fpm`
@ -1454,7 +1502,6 @@ Remote debug Laravel web and phpunit tests.
<br> <br>
<a name="keep-tracking-Laradock"></a> <a name="keep-tracking-Laradock"></a>
## Keep track of your Laradock changes ## Keep track of your Laradock changes
@ -1469,7 +1516,6 @@ Remote debug Laravel web and phpunit tests.
<br> <br>
<a name="upgrading-laradock"></a> <a name="upgrading-laradock"></a>
## Upgrading Laradock ## Upgrading Laradock
@ -1490,9 +1536,6 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
<br> <br>
<a name="Speed-MacOS"></a> <a name="Speed-MacOS"></a>
## Improve speed on MacOS ## Improve speed on MacOS
@ -1521,11 +1564,14 @@ Quick Setup giude, (we recommend you check their docs)
<br> <br>
<a name="Docker-Sync"></a> <a name="Docker-Sync"></a>
### Workaround B: using d4m-nfs ### Workaround B: using d4m-nfs
You can use the d4m-nfs solution in 2 ways, one is using the Laradock built it integration, and the other is using the tool separatly. Below is show case of both methods: You can use the d4m-nfs solution in 2 ways, the first is by using the built-in Laradock integration, and the second is using the tool separately. Below is show case of both methods:
### B.1: using the built in d4m-nfs integration ### B.1: using the built in d4m-nfs integration
@ -1610,8 +1656,6 @@ Visit the [docker-sync documentation](https://github.com/EugenMayer/docker-sync/
<br> <br>
### B.2: using the d4m-nfs tool ### B.2: using the d4m-nfs tool
@ -1630,7 +1674,7 @@ Click on the Docker Icon > Preferences > (remove everything form the list except
git clone https://github.com/IFSight/d4m-nfs ~/d4m-nfs git clone https://github.com/IFSight/d4m-nfs ~/d4m-nfs
``` ```
4) Create (or edit) the file `~/d4m-nfs/etc/d4m-nfs-mounts.txt`, and write the follwing configuration in it: 4) Create (or edit) the file `~/d4m-nfs/etc/d4m-nfs-mounts.txt`, and write the following configuration in it:
```txt ```txt
/Users:/Users /Users:/Users
@ -1658,16 +1702,6 @@ docker-compose up ...
<br> <br>
<a name="Common-Problems"></a> <a name="Common-Problems"></a>
## Common Problems ## Common Problems
@ -1679,7 +1713,6 @@ docker-compose up ...
<br> <br>
## I see a blank (white) page instead of the Laravel 'Welcome' page! ## I see a blank (white) page instead of the Laravel 'Welcome' page!
@ -1693,6 +1726,7 @@ sudo chmod -R 777 storage bootstrap/cache
<br> <br>
## I see "Welcome to nginx" instead of the Laravel App! ## I see "Welcome to nginx" instead of the Laravel App!
@ -1702,6 +1736,7 @@ Use `http://127.0.0.1` instead of `http://localhost` in your browser.
<br> <br>
## I see an error message containing `address already in use` or `port is already allocated` ## I see an error message containing `address already in use` or `port is already allocated`
@ -1711,6 +1746,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33
<br> <br>
## I get NGINX error 404 Not Found on Windows. ## I get NGINX error 404 Not Found on Windows.
@ -1723,6 +1759,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33
<br> <br>
## The time in my services does not match the current time ## The time in my services does not match the current time
@ -1733,6 +1770,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33
<br> <br>
## I get MySQL connection refused ## I get MySQL connection refused
@ -1757,3 +1795,30 @@ Example:
WORKSPACE_NPM_REGISTRY=https://registry.npm.taobao.org WORKSPACE_NPM_REGISTRY=https://registry.npm.taobao.org
WORKSPACE_COMPOSER_REPO_PACKAGIST=https://packagist.phpcomposer.com WORKSPACE_COMPOSER_REPO_PACKAGIST=https://packagist.phpcomposer.com
``` ```
<br>
## I get `Module build failed: Error: write EPIPE` while compiling react application
When you run `npm build` or `yarn dev` building a react application using webpack with elixir you may receive a `Error: write EPIPE` while processing .jpg images.
This is caused of an outdated library for processing **.jpg files** in ubuntu 16.04.
To fix the problem you can follow those steps
1 - Open the `.env`.
2 - Search for `WORKSPACE_INSTALL_LIBPNG` or add the key if missing.
3 - Set the value to true:
```dotenv
WORKSPACE_INSTALL_LIBPNG=true
```
4 - Finally rebuild the workspace image
```bash
docker-compose build workspace
```

View File

@ -94,7 +94,7 @@ Make sure to replace `project-z` with your project folder name.
<a name="B"></a> <a name="B"></a>
### B) Setup for Multiple Projects: ### B) Setup for Multiple Projects:
> (Follow these steps if you want a single Docker environment for all your project) > (Follow these steps if you want a single Docker environment for all your projects)
1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)): 1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
@ -143,7 +143,7 @@ If you use Chrome 63 or above for development, don't use `.dev`. [Why?](https://
If you are using **Docker Toolbox** (VM), do one of the following: If you are using **Docker Toolbox** (VM), do one of the following:
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock) - Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)* - Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/LaraDock-ToolBox) branch. *(outdated)*
<br> <br>
@ -161,11 +161,13 @@ We recommend using a Docker version which is newer than 1.13.
cp env-example .env cp env-example .env
``` ```
You can edit the `.env` file to choose which software's you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables are been used. You can edit the `.env` file to choose which software you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables have been used.
Depending on the host's operating system you may need to change the value given to `COMPOSE_FILE`. When you are running Laradock on Mac OS the correct file separator to use is `:`. When running Laradock from a Windows environment multiple files must be separated with `;`. Depending on the host's operating system you may need to change the value given to `COMPOSE_FILE`. When you are running Laradock on Mac OS the correct file separator to use is `:`. When running Laradock from a Windows environment multiple files must be separated with `;`.
2 - Build the enviroment and run it using `docker-compose` By default the containers that will be created have the current directory name as suffix (e.g. `laradock_workspace_1`). This can cause mixture of data inside the container volumes if you use laradock in multiple projects. In this case, either read the guide for [multiple projects](#B) or change the variable `COMPOSE_PROJECT_NAME` to something unique like your project name.
2 - Build the environment and run it using `docker-compose`
In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts: In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:
@ -173,7 +175,7 @@ In this example we'll see how to run NGINX (web server) and MySQL (database engi
docker-compose up -d nginx mysql docker-compose up -d nginx mysql
``` ```
**Note**: The web servers `nginx`, `apache`.. all depend on `php-fpm`, means if you just run, them they will automatically run the `php-fpm` for you, so no need to specify them in the `up` command. If you don't see them running then you may need run them as follow: `docker-compose up -d nginx php-fpm mysql...`. **Note**: All the web server containers `nginx`, `apache` ..etc depends on `php-fpm`, which means if you run any of them, they will automatically launch the `php-fpm` container for you, so no need to explicitly specify it in the `up` command. If you have to do so, you may need to run them as follows: `docker-compose up -d nginx php-fpm mysql`.
You can select your own combination of containers from [this list](http://laradock.io/introduction/#supported-software-images). You can select your own combination of containers from [this list](http://laradock.io/introduction/#supported-software-images).
@ -203,7 +205,7 @@ docker-compose exec --user=laradock workspace bash
*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)* *You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
<br> <br>
4 - Update your project configurations to use the database host 4 - Update your project configuration to use the database host
Open your PHP project's `.env` file or whichever configuration file you are reading from, and set the database host `DB_HOST` to `mysql`: Open your PHP project's `.env` file or whichever configuration file you are reading from, and set the database host `DB_HOST` to `mysql`:

View File

@ -197,7 +197,7 @@ This is needed Prior to Creating Let's Encypt
## Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt ## Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt
``` ```
$root@server:~/laravel/laradock/caddy# docker-compose up caddy $root@server:~/laravel/laradock# docker-compose up caddy
``` ```
You'll be prompt here to enter your email... you may enter it or not You'll be prompt here to enter your email... you may enter it or not
@ -218,8 +218,8 @@ After it finishes, press `Ctrl` + `C` to exit.
## Stop All Containers and ReRun Caddy and Other Containers on Background ## Stop All Containers and ReRun Caddy and Other Containers on Background
``` ```
$root@server:~/laravel/laradock/caddy# docker-compose down $root@server:~/laravel/laradock# docker-compose down
$root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy $root@server:~/laravel/laradock# docker-compose up -d mysql caddy
``` ```
View your Site in the Browser Securely Using HTTPS (https://yourdomain.com) View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)

View File

@ -97,7 +97,7 @@ Beanstalkd - RabbitMQ - PHP Worker
- **Queueing Management:** - **Queueing Management:**
Beanstalkd Console - RabbitMQ Console Beanstalkd Console - RabbitMQ Console
- **Random Tools:** - **Random Tools:**
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - Portainer - Laravel Echo... HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Gitlab - Mailhog - MailDev - Minio - Varnish - Swoole - NetData - Portainer - Laravel Echo...
Laradock introduces the **Workspace** Image, as a development environment. Laradock introduces the **Workspace** Image, as a development environment.
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose. It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.

View File

@ -50,6 +50,7 @@ services:
- PHP_VERSION=${PHP_VERSION} - PHP_VERSION=${PHP_VERSION}
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION} - INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP} - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP} - INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
@ -61,6 +62,9 @@ services:
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY} - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN} - INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
- INSTALL_NPM_GULP=${WORKSPACE_INSTALL_NPM_GULP}
- INSTALL_NPM_BOWER=${WORKSPACE_INSTALL_NPM_BOWER}
- INSTALL_NPM_VUE_CLI=${WORKSPACE_INSTALL_NPM_VUE_CLI}
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH} - INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE} - INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE} - INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
@ -83,6 +87,7 @@ services:
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS} - INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT} - INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE} - INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
- PUID=${WORKSPACE_PUID} - PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID} - PGID=${WORKSPACE_PGID}
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION} - CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
@ -112,6 +117,7 @@ services:
args: args:
- PHP_VERSION=${PHP_VERSION} - PHP_VERSION=${PHP_VERSION}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP} - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
- INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP} - INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP}
@ -137,6 +143,7 @@ services:
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE} - INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS} - INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK} - INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
- INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR}
volumes: volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini - ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
@ -146,10 +153,13 @@ services:
- "dockerhost:${DOCKER_HOST_IP}" - "dockerhost:${DOCKER_HOST_IP}"
environment: environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG} - PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
- DOCKER_HOST=tcp://docker-in-docker:2375
depends_on: depends_on:
- workspace - workspace
networks: networks:
- backend - backend
links:
- docker-in-docker
### PHP Worker ############################################ ### PHP Worker ############################################
php-worker: php-worker:
@ -322,6 +332,7 @@ services:
build: ./postgres build: ./postgres
volumes: volumes:
- ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data - ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data
- ${POSTGRES_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
ports: ports:
- "${POSTGRES_PORT}:5432" - "${POSTGRES_PORT}:5432"
environment: environment:
@ -511,7 +522,6 @@ services:
- frontend - frontend
- backend - backend
### ElasticSearch ######################################## ### ElasticSearch ########################################
elasticsearch: elasticsearch:
build: ./elasticsearch build: ./elasticsearch
@ -534,7 +544,6 @@ services:
- frontend - frontend
- backend - backend
### Kibana ############################################## ### Kibana ##############################################
kibana: kibana:
build: ./kibana build: ./kibana
@ -707,6 +716,162 @@ services:
volumes: volumes:
- ${DATA_PATH_HOST}/portainer_data:/data - ${DATA_PATH_HOST}/portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
ports: ports:
- 9010:9000 - 9010:9000
networks:
- backend
### Gitlab ################################################
gitlab:
build:
context: ./gitlab
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url '${GITLAB_DOMAIN_NAME}'
redis['enable'] = false
nginx['listen_https'] = false
nginx['listen_port'] = 80
postgresql['enable'] = false
gitlab_rails['trusted_proxies'] = ['caddy','nginx','apache2']
gitlab_rails['redis_host'] = 'redis'
gitlab_rails['redis_database'] = 8
gitlab_rails['db_host'] = 'postgres'
gitlab_rails['db_username'] = 'laradock_gitlab'
gitlab_rails['db_password'] = 'laradock_gitlab'
gitlab_rails['db_database'] = 'laradock_gitlab'
gitlab_rails['initial_root_password'] = '${GITLAB_ROOT_PASSWORD}'
gitlab_rails['gitlab_shell_ssh_port'] = ${GITLAB_HOST_SSH_PORT}
volumes:
- ${DATA_PATH_HOST}/gitlab/config:/etc/gitlab
- ${DATA_PATH_HOST}/gitlab/data:/var/opt/gitlab
- ${GITLAB_HOST_LOG_PATH}:/var/log/gitlab
ports:
- "${GITLAB_HOST_HTTP_PORT}:80"
- "${GITLAB_HOST_HTTPS_PORT}:443"
- "${GITLAB_HOST_SSH_PORT}:22"
networks:
- backend
depends_on:
- redis
- postgres
gitlab-runner:
image: gitlab/gitlab-runner:latest
environment:
- CI_SERVER_URL=${GITLAB_DOMAIN_NAME}
volumes:
- ${DATA_PATH_HOST}/gitlab/runner:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock:rw
restart: always
### JupyterHub #########################################
jupyterhub:
build:
context: ./jupyterhub
depends_on:
- postgres
- jupyterhub-user
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
- ${DATA_PATH_HOST}/jupyterhub/:/data
- ${JUPYTERHUB_CUSTOM_CONFIG}:/jupyterhub_config.py
- ${JUPYTERHUB_USER_DATA}:/user-data
- ${JUPYTERHUB_USER_LIST}:/userlist
networks:
- backend
ports:
- "${JUPYTERHUB_PORT}:80"
environment:
- TERM=xterm
- JUPYTERHUB_USER_DATA=${JUPYTERHUB_USER_DATA}
- JUPYTERHUB_POSTGRES_DB=${JUPYTERHUB_POSTGRES_DB}
- JUPYTERHUB_POSTGRES_USER=${JUPYTERHUB_POSTGRES_USER}
- JUPYTERHUB_POSTGRES_HOST=${JUPYTERHUB_POSTGRES_HOST}
- JUPYTERHUB_POSTGRES_PASSWORD=${JUPYTERHUB_POSTGRES_PASSWORD}
- JUPYTERHUB_OAUTH_CALLBACK_URL=${JUPYTERHUB_OAUTH_CALLBACK_URL}
- JUPYTERHUB_OAUTH_CLIENT_ID=${JUPYTERHUB_OAUTH_CLIENT_ID}
- JUPYTERHUB_OAUTH_CLIENT_SECRET=${JUPYTERHUB_OAUTH_CLIENT_SECRET}
- JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE=${JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE}
jupyterhub-user:
build:
context: ./jupyterhub
dockerfile: Dockerfile.user
command: ["sh", "-c", "echo \"build only\""]
### IPython #########################################
ipython-controller:
build:
context: ./ipython
dockerfile: Dockerfile.controller
networks:
- backend
extra_hosts:
- "laradock-ipython:${LARADOCK_IPYTHON_CONTROLLER_IP}"
ports:
- "33327-33338:33327-33338"
ipython-engine:
build:
context: ./ipython
dockerfile: Dockerfile.engine
networks:
- backend
extra_hosts:
- "laradock-ipython:${LARADOCK_IPYTHON_CONTROLLER_IP}"
### Docker-in-Docker ################################################
docker-in-docker:
image: docker:dind
privileged: true
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
expose:
- 2375
networks:
- backend
### NetData ################################################
netdata:
image: titpetric/netdata:latest
cap_add:
- SYS_PTRACE
volumes:
- /:/host:ro
ports:
- "${NETDATA_PORT}:19999"
networks:
- backend
### PHPRedisAdmin ################################################
phpredisadmin:
image: erikdubbelboer/phpredisadmin:latest
environment:
- ADMIN_USER=${REDIS_WEBUI_USERNAME}
- ADMIN_PASS=${REDIS_WEBUI_PASSWORD}
- REDIS_1_HOST=${REDIS_WEBUI_CONNECT_HOST}
- REDIS_1_PORT=${REDIS_WEBUI_CONNECT_PORT}
networks:
- backend
ports:
- "${REDIS_WEBUI_PORT}:80"
depends_on:
- redis
### MongoWebUI ################################################
mongo-webui:
build:
context: ./mongo-webui
restart: always
environment:
- ROOT_URL=${MONGO_WEBUI_ROOT_URL}
- MONGO_URL=${MONGO_WEBUI_MONGO_URL}
- INSTALL_MONGO=${MONGO_WEBUI_INSTALL_MONGO}
volumes:
- ${DATA_PATH_HOST}/mongo-webui:/data/db
ports:
- "${MONGO_WEBUI_PORT}:3000"
networks:
- backend
depends_on:
- mongo

View File

@ -29,6 +29,9 @@ COMPOSE_FILE=docker-compose.yml
# Change the separator from : to ; on Windows # Change the separator from : to ; on Windows
COMPOSE_PATH_SEPARATOR=: COMPOSE_PATH_SEPARATOR=:
# Define the prefix of container names. This is useful if you have multiple projects that use laradock to have seperate containers per project.
COMPOSE_PROJECT_NAME=laradock
### PHP Version ########################################### ### PHP Version ###########################################
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6 # Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6
@ -73,14 +76,18 @@ DOCKER_SYNC_STRATEGY=native_osx
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
WORKSPACE_COMPOSER_REPO_PACKAGIST= WORKSPACE_COMPOSER_REPO_PACKAGIST=
WORKSPACE_INSTALL_NODE=true WORKSPACE_INSTALL_NODE=true
WORKSPACE_NODE_VERSION=stable WORKSPACE_NODE_VERSION=node
WORKSPACE_NPM_REGISTRY= WORKSPACE_NPM_REGISTRY=
WORKSPACE_INSTALL_YARN=true WORKSPACE_INSTALL_YARN=true
WORKSPACE_YARN_VERSION=latest WORKSPACE_YARN_VERSION=latest
WORKSPACE_INSTALL_NPM_GULP=true
WORKSPACE_INSTALL_NPM_BOWER=true
WORKSPACE_INSTALL_NPM_VUE_CLI=true
WORKSPACE_INSTALL_PHPREDIS=true WORKSPACE_INSTALL_PHPREDIS=true
WORKSPACE_INSTALL_WORKSPACE_SSH=false WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_SUBVERSION=false WORKSPACE_INSTALL_SUBVERSION=false
WORKSPACE_INSTALL_XDEBUG=false WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_PHPDBG=false
WORKSPACE_INSTALL_LDAP=false WORKSPACE_INSTALL_LDAP=false
WORKSPACE_INSTALL_SOAP=false WORKSPACE_INSTALL_SOAP=false
WORKSPACE_INSTALL_IMAP=false WORKSPACE_INSTALL_IMAP=false
@ -106,6 +113,7 @@ WORKSPACE_INSTALL_TERRAFORM=false
WORKSPACE_INSTALL_DUSK_DEPS=false WORKSPACE_INSTALL_DUSK_DEPS=false
WORKSPACE_INSTALL_PG_CLIENT=false WORKSPACE_INSTALL_PG_CLIENT=false
WORKSPACE_INSTALL_SWOOLE=false WORKSPACE_INSTALL_SWOOLE=false
WORKSPACE_INSTALL_LIBPNG=false
WORKSPACE_PUID=1000 WORKSPACE_PUID=1000
WORKSPACE_PGID=1000 WORKSPACE_PGID=1000
WORKSPACE_CHROME_DRIVER_VERSION=2.32 WORKSPACE_CHROME_DRIVER_VERSION=2.32
@ -125,6 +133,7 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true
PHP_FPM_INSTALL_PHPREDIS=true PHP_FPM_INSTALL_PHPREDIS=true
PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_MEMCACHED=false
PHP_FPM_INSTALL_XDEBUG=false PHP_FPM_INSTALL_XDEBUG=false
PHP_FPM_INSTALL_PHPDBG=false
PHP_FPM_INSTALL_IMAP=false PHP_FPM_INSTALL_IMAP=false
PHP_FPM_INSTALL_MONGO=false PHP_FPM_INSTALL_MONGO=false
PHP_FPM_INSTALL_AMQP=false PHP_FPM_INSTALL_AMQP=false
@ -139,6 +148,7 @@ PHP_FPM_INSTALL_LDAP=false
PHP_FPM_INSTALL_SWOOLE=false PHP_FPM_INSTALL_SWOOLE=false
PHP_FPM_INSTALL_PG_CLIENT=false PHP_FPM_INSTALL_PG_CLIENT=false
PHP_FPM_INSTALL_PCNTL=false PHP_FPM_INSTALL_PCNTL=false
PHP_FPM_INSTALL_CALENDAR=false
### PHP_WORKER ############################################ ### PHP_WORKER ############################################
@ -208,6 +218,7 @@ POSTGRES_DB=default
POSTGRES_USER=default POSTGRES_USER=default
POSTGRES_PASSWORD=secret POSTGRES_PASSWORD=secret
POSTGRES_PORT=5432 POSTGRES_PORT=5432
POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d
### RABBITMQ ############################################## ### RABBITMQ ##############################################
@ -349,3 +360,44 @@ LARAVEL_ECHO_SERVER_PORT=6001
SOLR_VERSION=5.5 SOLR_VERSION=5.5
SOLR_PORT=8983 SOLR_PORT=8983
SOLR_DATAIMPORTHANDLER_MYSQL=false SOLR_DATAIMPORTHANDLER_MYSQL=false
### GITLAB ###############################################
GITLAB_HOST_HTTP_PORT=8989
GITLAB_HOST_HTTPS_PORT=9898
GITLAB_HOST_SSH_PORT=2289
GITLAB_DOMAIN_NAME=http://localhost
GITLAB_ROOT_PASSWORD=laradock
GITLAB_HOST_LOG_PATH=./logs/gitlab
### JUPYTERHUB ###############################################
JUPYTERHUB_POSTGRES_HOST=postgres
JUPYTERHUB_POSTGRES_USER=laradock_jupyterhub
JUPYTERHUB_POSTGRES_PASSWORD=laradock_jupyterhub
JUPYTERHUB_POSTGRES_DB=laradock_jupyterhub
JUPYTERHUB_PORT=9991
JUPYTERHUB_OAUTH_CALLBACK_URL=http://laradock:9991/hub/oauth_callback
JUPYTERHUB_OAUTH_CLIENT_ID={GITHUB_CLIENT_ID}
JUPYTERHUB_OAUTH_CLIENT_SECRET={GITHUB_CLIENT_SECRET}
JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE=laradock_jupyterhub-user
JUPYTERHUB_CUSTOM_CONFIG=./jupyterhub/jupyterhub_config.py
JUPYTERHUB_USER_DATA=/jupyterhub
JUPYTERHUB_USER_LIST=./jupyterhub/userlist
### IPYTHON ##################################################
LARADOCK_IPYTHON_CONTROLLER_IP=127.0.0.1
### NETDATA ###############################################
NETDATA_PORT=19999
### PHPREDISADMIN #########################################
REDIS_WEBUI_USERNAME=laradock
REDIS_WEBUI_PASSWORD=laradock
REDIS_WEBUI_CONNECT_HOST=redis
REDIS_WEBUI_CONNECT_PORT=6379
REDIS_WEBUI_PORT=9987
### MONGOWEBUI ###############################################
MONGO_WEBUI_PORT=3000
MONGO_WEBUI_ROOT_URL=http://localhost
MONGO_WEBUI_MONGO_URL=mongodb://mongo:27017/
MONGO_WEBUI_INSTALL_MONGO=false

3
gitlab/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM gitlab/gitlab-ce:latest
LABEL maintainer="ahkui <ahkui@outlook.com>"

View File

@ -0,0 +1,17 @@
FROM python:3.5-alpine
LABEL maintainer="ahkui <ahkui@outlook.com>"
USER root
RUN apk add --no-cache build-base
RUN python -m pip --quiet --no-cache-dir install \
ipyparallel
RUN ipython profile create --parallel --profile=default
COPY ipcontroller-client.json /root/.ipython/profile_default/security/ipcontroller-client.json
COPY ipcontroller-engine.json /root/.ipython/profile_default/security/ipcontroller-engine.json
CMD ["sh","-c","ipcontroller --ip=* --reuse"]

23
ipython/Dockerfile.engine Normal file
View File

@ -0,0 +1,23 @@
FROM python:3.5-alpine
LABEL maintainer="ahkui <ahkui@outlook.com>"
USER root
RUN apk add --no-cache build-base
RUN python -m pip --quiet --no-cache-dir install \
ipyparallel \
numpy \
pandas \
pymongo \
redis \
requests \
bs4
RUN ipython profile create --parallel --profile=default
COPY ipcontroller-client.json /root/.ipython/profile_default/security/ipcontroller-client.json
COPY ipcontroller-engine.json /root/.ipython/profile_default/security/ipcontroller-engine.json
CMD ["sh","-c","ipcluster engines"]

View File

@ -0,0 +1,16 @@
{
"key": "868074dd-060311910ab3d6991611bccf",
"signature_scheme": "hmac-sha256",
"unpack": "json",
"pack": "json",
"ssh": "",
"task_scheme": "leastload",
"interface": "tcp://*",
"location": "laradock-ipython",
"notification": 33338,
"iopub": 33337,
"control": 33336,
"mux": 33335,
"task": 33334,
"registration": 33333
}

View File

@ -0,0 +1,16 @@
{
"key": "868074dd-060311910ab3d6991611bccf",
"signature_scheme": "hmac-sha256",
"unpack": "json",
"pack": "json",
"ssh": "",
"interface": "tcp://*",
"location": "laradock-ipython",
"iopub": 33327,
"hb_ping": 33328,
"hb_pong": 33329,
"control": 33330,
"mux": 33331,
"task": 33332,
"registration": 33333
}

View File

@ -93,7 +93,7 @@ docker run --name myjenkins -p 8080:8080 -p 50000:50000 --env JAVA_OPTS="-Djava.
``` ```
# Configuring reverse proxy # Configuring reverse proxy
If you want to install Jenkins behind a reverse proxy with prefix, example: mysite.com/jenkins, you need to add environnement variable `JENKINS_OPTS="--prefix=/jenkins"` and then follow the below procedures to configure your reverse proxy, which will depend if you have Apache ou Nginx: If you want to install Jenkins behind a reverse proxy with prefix, example: mysite.com/jenkins, you need to add environment variable `JENKINS_OPTS="--prefix=/jenkins"` and then follow the below procedures to configure your reverse proxy, which will depend if you have Apache ou Nginx:
- [Apache](https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache) - [Apache](https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache)
- [Nginx](https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy) - [Nginx](https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy)
@ -154,7 +154,7 @@ COPY custom.groovy /usr/share/jenkins/ref/init.groovy.d/custom.groovy
## Preinstalling plugins ## Preinstalling plugins
You can rely on the `install-plugins.sh` script to pass a set of plugins to download with their dependencies. You can rely on the `install-plugins.sh` script to pass a set of plugins to download with their dependencies.
Use plugin artifact ID, whithout `-plugin` extension, and append the version if needed separated by `:`. Use plugin artifact ID, without `-plugin` extension, and append the version if needed separated by `:`.
Dependencies that are already included in the Jenkins war will only be downloaded if their required version is newer than the one included. Dependencies that are already included in the Jenkins war will only be downloaded if their required version is newer than the one included.
``` ```

26
jupyterhub/Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM python
LABEL maintainer="ahkui <ahkui@outlook.com>"
ENV JUPYTERHUB_USER_DATA ${JUPYTERHUB_USER_DATA}
ENV JUPYTERHUB_POSTGRES_DB ${JUPYTERHUB_POSTGRES_DB}
ENV JUPYTERHUB_POSTGRES_USER ${JUPYTERHUB_POSTGRES_USER}
ENV JUPYTERHUB_POSTGRES_HOST ${JUPYTERHUB_POSTGRES_HOST}
ENV JUPYTERHUB_POSTGRES_PASSWORD ${JUPYTERHUB_POSTGRES_PASSWORD}
ENV JUPYTERHUB_OAUTH_CALLBACK_URL ${JUPYTERHUB_OAUTH_CALLBACK_URL}
ENV JUPYTERHUB_OAUTH_CLIENT_ID ${JUPYTERHUB_OAUTH_CLIENT_ID}
ENV JUPYTERHUB_OAUTH_CLIENT_SECRET ${JUPYTERHUB_OAUTH_CLIENT_SECRET}
ENV JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE ${JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE}
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt update -yqq && \
apt-get install -y nodejs
RUN npm install -g configurable-http-proxy
RUN pip install jupyterhub
RUN pip install oauthenticator
RUN pip install dockerspawner
RUN pip install psycopg2 psycopg2-binary
CMD ["sh", "-c", "jupyterhub upgrade-db && jupyterhub -f /jupyterhub_config.py"]

View File

@ -0,0 +1,72 @@
FROM tensorflow/tensorflow:latest-gpu
MAINTAINER ahkui <ahkui@outlook.com>
RUN apt-get update && apt-get install -y --no-install-recommends \
python \
python-dev \
&& \
apt-get autoremove -y && \
apt-get autoclean && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
git \
&& \
apt-get autoremove -y && \
apt-get autoclean && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py && \
rm get-pip.py
RUN python3 -m pip --quiet --no-cache-dir install \
Pillow \
h5py \
ipykernel \
jupyter \
notebook \
jupyterhub \
matplotlib \
numpy \
pandas \
scipy \
sklearn \
Flask \
gunicorn \
pymongo \
redis \
requests \
ipyparallel \
bs4 \
&& \
python3 -m ipykernel.kernelspec
RUN pip --no-cache-dir install \
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.8.0-cp35-cp35m-linux_x86_64.whl
RUN ln -s -f /usr/bin/python3 /usr/bin/python
COPY start.sh /usr/local/bin/
COPY start-notebook.sh /usr/local/bin/
COPY start-singleuser.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/start.sh
RUN chmod +x /usr/local/bin/start-notebook.sh
RUN chmod +x /usr/local/bin/start-singleuser.sh
RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.10.0/tini && \
mv tini /usr/local/bin/tini && \
chmod +x /usr/local/bin/tini
# cleanup
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENTRYPOINT ["tini", "--"]
CMD ["start-notebook.sh"]

View File

@ -0,0 +1,121 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# Configuration file for JupyterHub
import os
c = get_config()
def create_dir_hook(spawner):
username = spawner.user.name # get the username
volume_path = os.path.join('/user-data', username)
if not os.path.exists(volume_path):
# create a directory with umask 0755
# hub and container user must have the same UID to be writeable
# still readable by other users on the system
os.mkdir(volume_path, 0o755)
os.chown(volume_path, 1000,100)
# now do whatever you think your user needs
# ...
pass
# attach the hook function to the spawner
c.Spawner.pre_spawn_hook = create_dir_hook
# We rely on environment variables to configure JupyterHub so that we
# avoid having to rebuild the JupyterHub container every time we change a
# configuration parameter.
# Spawn single-user servers as Docker containers
c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'
# Spawn containers from this image
c.DockerSpawner.image = os.environ['JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE']
# JupyterHub requires a single-user instance of the Notebook server, so we
# default to using the `start-singleuser.sh` script included in the
# jupyter/docker-stacks *-notebook images as the Docker run command when
# spawning containers. Optionally, you can override the Docker run command
# using the DOCKER_SPAWN_CMD environment variable.
spawn_cmd = os.environ.get('JUPYTERHUB_DOCKER_SPAWN_CMD', "start-singleuser.sh")
c.DockerSpawner.extra_create_kwargs.update({ 'command': spawn_cmd })
# Connect containers to this Docker network
network_name = os.environ.get('JUPYTERHUB_NETWORK_NAME','laradock_backend')
c.DockerSpawner.use_internal_ip = True
c.DockerSpawner.network_name = network_name
# Pass the network name as argument to spawned containers
c.DockerSpawner.extra_host_config = { 'network_mode': network_name, 'runtime': 'nvidia' }
# c.DockerSpawner.extra_host_config = { 'network_mode': network_name, "devices":["/dev/nvidiactl","/dev/nvidia-uvm","/dev/nvidia0"] }
# Explicitly set notebook directory because we'll be mounting a host volume to
# it. Most jupyter/docker-stacks *-notebook images run the Notebook server as
# user `jovyan`, and set the notebook directory to `/home/jovyan/work`.
# We follow the same convention.
# notebook_dir = os.environ.get('JUPYTERHUB_DOCKER_NOTEBOOK_DIR') or '/home/jovyan/work'
notebook_dir = '/notebooks'
c.DockerSpawner.notebook_dir = notebook_dir
# Mount the real user's Docker volume on the host to the notebook user's
# notebook directory in the container
user_data = os.environ.get('JUPYTERHUB_USER_DATA','/jupyterhub')
c.DockerSpawner.volumes = {
user_data+'/{username}': notebook_dir
}
c.DockerSpawner.extra_create_kwargs.update({ 'user': 'root'})
# volume_driver is no longer a keyword argument to create_container()
# c.DockerSpawner.extra_create_kwargs.update({ 'volume_driver': 'local' })
# Remove containers once they are stopped
c.DockerSpawner.remove_containers = True
# For debugging arguments passed to spawned containers
c.DockerSpawner.debug = True
# User containers will access hub by container name on the Docker network
c.JupyterHub.hub_ip = 'jupyterhub'
c.JupyterHub.hub_port = 8000
# TLS config
c.JupyterHub.port = 80
# c.JupyterHub.ssl_key = os.environ['SSL_KEY']
# c.JupyterHub.ssl_cert = os.environ['SSL_CERT']
# Authenticate users with GitHub OAuth
c.JupyterHub.authenticator_class = 'oauthenticator.GitHubOAuthenticator'
c.GitHubOAuthenticator.oauth_callback_url = os.environ['JUPYTERHUB_OAUTH_CALLBACK_URL']
c.GitHubOAuthenticator.client_id = os.environ['JUPYTERHUB_OAUTH_CLIENT_ID']
c.GitHubOAuthenticator.client_secret = os.environ['JUPYTERHUB_OAUTH_CLIENT_SECRET']
# Persist hub data on volume mounted inside container
data_dir = '/data'
c.JupyterHub.cookie_secret_file = os.path.join(data_dir,
'jupyterhub_cookie_secret')
print(os.environ)
c.JupyterHub.db_url = 'postgresql://{user}:{password}@{host}/{db}'.format(
user=os.environ['JUPYTERHUB_POSTGRES_USER'],
host=os.environ['JUPYTERHUB_POSTGRES_HOST'],
password=os.environ['JUPYTERHUB_POSTGRES_PASSWORD'],
db=os.environ['JUPYTERHUB_POSTGRES_DB'],
)
# Whitlelist users and admins
c.Authenticator.whitelist = whitelist = set()
c.Authenticator.admin_users = admin = set()
c.JupyterHub.admin_access = True
pwd = os.path.dirname(__file__)
with open(os.path.join(pwd, 'userlist')) as f:
for line in f:
if not line:
continue
parts = line.split()
name = parts[0]
print(name)
whitelist.add(name)
if len(parts) > 1 and parts[1] == 'admin':
admin.add(name)
admin.add('laradock')

View File

@ -0,0 +1,12 @@
#!/bin/bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
set -e
if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
# launched by JupyterHub, use single-user entrypoint
exec /usr/local/bin/start-singleuser.sh $*
else
. /usr/local/bin/start.sh jupyter notebook $*
fi

View File

@ -0,0 +1,40 @@
#!/bin/bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
set -e
# set default ip to 0.0.0.0
if [[ "$NOTEBOOK_ARGS $@" != *"--ip="* ]]; then
NOTEBOOK_ARGS="--ip=0.0.0.0 $NOTEBOOK_ARGS"
fi
# handle some deprecated environment variables
# from DockerSpawner < 0.8.
# These won't be passed from DockerSpawner 0.9,
# so avoid specifying --arg=empty-string
# if [ ! -z "$NOTEBOOK_DIR" ]; then
# NOTEBOOK_ARGS="--notebook-dir='$NOTEBOOK_DIR' $NOTEBOOK_ARGS"
# fi
if [ ! -z "$JPY_PORT" ]; then
NOTEBOOK_ARGS="--port=$JPY_PORT $NOTEBOOK_ARGS"
fi
if [ ! -z "$JPY_USER" ]; then
NOTEBOOK_ARGS="--user=$JPY_USER $NOTEBOOK_ARGS"
fi
if [ ! -z "$JPY_COOKIE_NAME" ]; then
NOTEBOOK_ARGS="--cookie-name=$JPY_COOKIE_NAME $NOTEBOOK_ARGS"
fi
if [ ! -z "$JPY_BASE_URL" ]; then
NOTEBOOK_ARGS="--base-url=$JPY_BASE_URL $NOTEBOOK_ARGS"
fi
if [ ! -z "$JPY_HUB_PREFIX" ]; then
NOTEBOOK_ARGS="--hub-prefix=$JPY_HUB_PREFIX $NOTEBOOK_ARGS"
fi
if [ ! -z "$JPY_HUB_API_URL" ]; then
NOTEBOOK_ARGS="--hub-api-url=$JPY_HUB_API_URL $NOTEBOOK_ARGS"
fi
NOTEBOOK_ARGS=" --allow-root --notebook-dir='/notebooks' $NOTEBOOK_ARGS"
. /usr/local/bin/start.sh jupyterhub-singleuser $NOTEBOOK_ARGS $@

7
jupyterhub/start.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
set -e
exec sh -c "env PATH=$PATH $*"

1
jupyterhub/userlist Normal file
View File

@ -0,0 +1 @@
laradock

View File

@ -1,3 +1,3 @@
FROM docker.elastic.co/kibana/kibana:5.4.1 FROM docker.elastic.co/kibana/kibana:6.2.3
EXPOSE 5601 EXPOSE 5601

3
mongo-webui/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM mongoclient/mongoclient
LABEL maintainer="ahkui <ahkui@outlook.com>"

View File

@ -9,9 +9,7 @@ LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
ARG TZ=UTC ARG TZ=UTC
ENV TZ ${TZ} ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/
RUN chown -R mysql:root /var/lib/mysql/
COPY my.cnf /etc/mysql/conf.d/my.cnf COPY my.cnf /etc/mysql/conf.d/my.cnf

View File

@ -6,5 +6,5 @@
[mysql] [mysql]
[mysqld] [mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_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_ENGINE_SUBSTITUTION"
character-set-server=utf8 character-set-server=utf8

View File

@ -18,8 +18,12 @@ FROM laradock/php-fpm:2.2-${PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>" LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# always run apt update when start and after add new source list, then clean up at end. # always run apt update when start and after add new source list, then clean up at end.
RUN apt-get update -yqq && \ RUN apt-get update -yqq && \
apt-get install -y apt-utils && \
pecl channel-update pecl.php.net pecl channel-update pecl.php.net
# #
@ -101,6 +105,22 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Copy xdebug configuration for remote debugging # Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 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
###########################################################################
# Phpdbg:
###########################################################################
ARG INSTALL_PHPDBG=false
ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \
;fi
########################################################################### ###########################################################################
# Blackfire: # Blackfire:
########################################################################### ###########################################################################
@ -139,7 +159,11 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install swoole-2.0.11; \ pecl install swoole-2.0.11; \
else \ else \
pecl install swoole; \ if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
pecl install swoole-2.2.0; \
else \
pecl install swoole; \
fi \
fi && \ fi && \
docker-php-ext-enable swoole \ docker-php-ext-enable swoole \
;fi ;fi
@ -152,6 +176,10 @@ ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # Install the mongodb extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo && \
docker-php-ext-enable mongo \
;fi && \
pecl install mongodb && \ pecl install mongodb && \
docker-php-ext-enable mongodb \ docker-php-ext-enable mongodb \
;fi ;fi
@ -176,6 +204,8 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
ARG INSTALL_ZIP_ARCHIVE=false ARG INSTALL_ZIP_ARCHIVE=false
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
apt-get install libzip-dev -y && \
docker-php-ext-configure zip --with-libzip && \
# Install the zip extension # Install the zip extension
docker-php-ext-install zip \ docker-php-ext-install zip \
;fi ;fi
@ -185,7 +215,7 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
########################################################################### ###########################################################################
ARG INSTALL_PCNTL=false ARG INSTALL_PCNTL=false
RUN if [ ${INSTALL_PCNTL} = true]; then \ RUN if [ ${INSTALL_PCNTL} = true ]; then \
# Installs pcntl, helpful for running Horizon # Installs pcntl, helpful for running Horizon
docker-php-ext-install pcntl \ docker-php-ext-install pcntl \
;fi ;fi
@ -409,7 +439,7 @@ USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false ARG INSTALL_IMAGE_OPTIMIZERS=false
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \ apt-get install -y jpegoptim optipng pngquant gifsicle \
;fi ;fi
########################################################################### ###########################################################################
@ -439,6 +469,19 @@ RUN if [ ${INSTALL_IMAP} = true ]; then \
docker-php-ext-install imap \ docker-php-ext-install imap \
;fi ;fi
###########################################################################
# Calendar:
###########################################################################
USER root
ARG INSTALL_CALENDAR=false
RUN if [ ${INSTALL_CALENDAR} = true ]; then \
docker-php-ext-configure calendar && \
docker-php-ext-install calendar \
;fi
########################################################################### ###########################################################################
# Check PHP version: # Check PHP version:
########################################################################### ###########################################################################

View File

@ -0,0 +1,3 @@
*.sh
!init_gitlab_db.sh
!init_jupyterhub_db.sh

View File

@ -0,0 +1,33 @@
#!/bin/bash
#
# Copy createdb.sh.example to createdb.sh
# then uncomment then set database name and username to create you need databases
#
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER myuser WITH PASSWORD 'mypassword';
# CREATE DATABASE myshop_db;
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
# EOSQL
#
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
#
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db1 WITH PASSWORD 'db1';
# CREATE DATABASE db1;
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db2 WITH PASSWORD 'db2';
# CREATE DATABASE db2;
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db3 WITH PASSWORD 'db3';
# CREATE DATABASE db3;
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
# EOSQL

View File

@ -0,0 +1,41 @@
#!/bin/bash
#
# Copy createdb.sh.example to createdb.sh
# then uncomment then set database name and username to create you need databases
#
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER myuser WITH PASSWORD 'mypassword';
# CREATE DATABASE myshop_db;
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
# EOSQL
#
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
#
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db1 WITH PASSWORD 'db1';
# CREATE DATABASE db1;
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db2 WITH PASSWORD 'db2';
# CREATE DATABASE db2;
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db3 WITH PASSWORD 'db3';
# CREATE DATABASE db3;
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
# EOSQL
#
### default database and user for gitlab ##############################################
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER laradock_gitlab WITH PASSWORD 'laradock_gitlab';
CREATE DATABASE laradock_gitlab;
GRANT ALL PRIVILEGES ON DATABASE laradock_gitlab TO laradock_gitlab;
ALTER ROLE laradock_gitlab CREATEROLE SUPERUSER;
EOSQL

View File

@ -0,0 +1,41 @@
#!/bin/bash
#
# Copy createdb.sh.example to createdb.sh
# then uncomment then set database name and username to create you need databases
#
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER myuser WITH PASSWORD 'mypassword';
# CREATE DATABASE myshop_db;
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
# EOSQL
#
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
#
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db1 WITH PASSWORD 'db1';
# CREATE DATABASE db1;
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db2 WITH PASSWORD 'db2';
# CREATE DATABASE db2;
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db3 WITH PASSWORD 'db3';
# CREATE DATABASE db3;
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
# EOSQL
#
### default database and user for jupyterhub ##############################################
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER laradock_jupyterhub WITH PASSWORD 'laradock_jupyterhub';
CREATE DATABASE laradock_jupyterhub;
GRANT ALL PRIVILEGES ON DATABASE laradock_jupyterhub TO laradock_jupyterhub;
ALTER ROLE laradock_jupyterhub CREATEROLE SUPERUSER;
EOSQL

View File

@ -18,6 +18,9 @@ FROM laradock/workspace:2.2-${PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>" LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# Start as root # Start as root
USER root USER root
@ -148,6 +151,27 @@ COPY ./crontab /etc/cron.d
RUN chmod -R 644 /etc/cron.d RUN chmod -R 644 /etc/cron.d
###########################################################################
# Drush:
###########################################################################
# Deprecated install of Drush 8 and earlier versions.
# Drush 9 and up require Drush to be listed as a composer dependency of your site.
USER root
ARG INSTALL_DRUSH=false
ARG DRUSH_VERSION
ENV DRUSH_VERSION ${DRUSH_VERSION}
RUN if [ ${INSTALL_DRUSH} = true ]; then \
apt-get -y install mysql-client && \
# Install Drush with the phar file.
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/${DRUSH_VERSION}/drush.phar | bash && \
chmod +x /usr/local/bin/drush && \
drush core-status \
;fi
########################################################################### ###########################################################################
# SOAP: # SOAP:
########################################################################### ###########################################################################
@ -209,7 +233,7 @@ ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_XDEBUG} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands # Load the xdebug extension only with phpunit commands
apt-get install -y --force-yes php${PHP_VERSION}-xdebug && \ apt-get install -y php${PHP_VERSION}-xdebug && \
sed -i 's/^;//g' /etc/php/${PHP_VERSION}/cli/conf.d/20-xdebug.ini && \ sed -i 's/^;//g' /etc/php/${PHP_VERSION}/cli/conf.d/20-xdebug.ini && \
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
;fi ;fi
@ -217,6 +241,24 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# ADD for REMOTE debugging # ADD for REMOTE debugging
COPY ./xdebug.ini /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini COPY ./xdebug.ini /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \
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
###########################################################################
# Phpdbg:
###########################################################################
USER root
ARG INSTALL_PHPDBG=false
ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \
;fi
########################################################################### ###########################################################################
# Blackfire: # Blackfire:
########################################################################### ###########################################################################
@ -264,7 +306,12 @@ ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # Install the mongodb extension
pecl -q install mongodb && \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo && \
echo "extension=mongo.so" >> /etc/php/${PHP_VERSION}/mods-available/mongo.ini && \
ln -s /etc/php/${PHP_VERSION}/mods-available/mongo.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongo.ini \
;fi && \
pecl install mongodb && \
echo "extension=mongodb.so" >> /etc/php/${PHP_VERSION}/mods-available/mongodb.ini && \ echo "extension=mongodb.so" >> /etc/php/${PHP_VERSION}/mods-available/mongodb.ini && \
ln -s /etc/php/${PHP_VERSION}/mods-available/mongodb.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongodb.ini \ ln -s /etc/php/${PHP_VERSION}/mods-available/mongodb.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongodb.ini \
;fi ;fi
@ -309,31 +356,25 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl -q install swoole-2.0.11; \ pecl -q install swoole-2.0.11; \
else \ else \
pecl -q install swoole; \ if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
pecl install swoole-2.2.0; \
else \
pecl install swoole; \
fi \
fi && \ fi && \
echo "extension=swoole.so" >> /etc/php/${PHP_VERSION}/mods-available/swoole.ini && \ echo "extension=swoole.so" >> /etc/php/${PHP_VERSION}/mods-available/swoole.ini && \
ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \ ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \
;fi ;fi
########################################################################### ###########################################################################
# Drush: # Libpng16 EXTENSION
########################################################################### ###########################################################################
# Deprecated install of Drush 8 and earlier versions. ARG INSTALL_LIBPNG=false
# Drush 9 and up require Drush to be listed as a composer dependency of your site.
USER root RUN if [ ${INSTALL_LIBPNG} = true ]; then \
apt update && \
ARG INSTALL_DRUSH=false apt install libpng16-16 \
ARG DRUSH_VERSION
ENV DRUSH_VERSION ${DRUSH_VERSION}
RUN if [ ${INSTALL_DRUSH} = true ]; then \
apt-get -y install mysql-client && \
# Install Drush with the phar file.
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/${DRUSH_VERSION}/drush.phar | bash && \
chmod +x /usr/local/bin/drush && \
drush core-status \
;fi ;fi
########################################################################### ###########################################################################
@ -358,24 +399,35 @@ USER laradock
########################################################################### ###########################################################################
# Check if NVM needs to be installed # Check if NVM needs to be installed
ARG NODE_VERSION=stable ARG NODE_VERSION=node
ENV NODE_VERSION ${NODE_VERSION} ENV NODE_VERSION ${NODE_VERSION}
ARG INSTALL_NODE=false ARG INSTALL_NODE=false
ARG INSTALL_NPM_GULP=false
ARG INSTALL_NPM_BOWER=false
ARG INSTALL_NPM_VUE_CLI=false
ARG NPM_REGISTRY ARG NPM_REGISTRY
ENV NPM_REGISTRY ${NPM_REGISTRY} ENV NPM_REGISTRY ${NPM_REGISTRY}
ENV NVM_DIR /home/laradock/.nvm ENV NVM_DIR /home/laradock/.nvm
RUN if [ ${INSTALL_NODE} = true ]; then \ RUN if [ ${INSTALL_NODE} = true ]; then \
# Install nvm (A Node Version Manager) # Install nvm (A Node Version Manager)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash && \ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \
. $NVM_DIR/nvm.sh && \ && . $NVM_DIR/nvm.sh \
nvm install ${NODE_VERSION} && \ && nvm install ${NODE_VERSION} \
nvm use ${NODE_VERSION} && \ && nvm use ${NODE_VERSION} \
nvm alias ${NODE_VERSION} && \ && nvm alias ${NODE_VERSION} \
if [ ${NPM_REGISTRY} ]; then \ && if [ ${NPM_REGISTRY} ]; then \
npm config set registry ${NPM_REGISTRY} \ npm config set registry ${NPM_REGISTRY} \
;fi && \ ;fi \
npm install -g gulp bower vue-cli \ && if [ ${INSTALL_NPM_GULP} = true ]; then \
npm install -g gulp \
;fi \
&& if [ ${INSTALL_NPM_BOWER} = true ]; then \
npm install -g bower \
;fi \
&& if [ ${INSTALL_NPM_VUE_CLI} = true ]; then \
npm install -g @vue/cli \
;fi \
;fi ;fi
# Wouldn't execute when added to the RUN statement in the above block # Wouldn't execute when added to the RUN statement in the above block
@ -637,9 +689,9 @@ USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false ARG INSTALL_IMAGE_OPTIMIZERS=false
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \ apt-get install -y jpegoptim optipng pngquant gifsicle && \
if [ ${INSTALL_NODE} = true ]; then \ if [ ${INSTALL_NODE} = true ]; then \
. ~/.bashrc && npm install -g svgo \ exec bash && . ~/.bashrc && npm install -g svgo \
;fi\ ;fi\
;fi ;fi
@ -686,7 +738,7 @@ USER root
ARG INSTALL_IMAGEMAGICK=false ARG INSTALL_IMAGEMAGICK=false
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get install -y --force-yes imagemagick php-imagick \ apt-get install -y imagemagick php-imagick \
;fi ;fi
########################################################################### ###########################################################################
@ -717,6 +769,15 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
apt-get -y install postgresql-client \ apt-get -y install postgresql-client \
;fi ;fi
###########################################################################
# nasm
###########################################################################
USER root
RUN apt-get update -yqq \
&& apt-get -yqq install nasm
########################################################################### ###########################################################################
# Dusk Dependencies: # Dusk Dependencies:
########################################################################### ###########################################################################

View File

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