commit
e77480b69f
|
@ -0,0 +1,46 @@
|
||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mahmoud@zalt.me. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
|
[homepage]: http://contributor-covenant.org
|
||||||
|
[version]: http://contributor-covenant.org/version/1/4/
|
|
@ -0,0 +1,3 @@
|
||||||
|
### First off, thanks for taking the time to contribute!
|
||||||
|
|
||||||
|
For the contribution guide [click here](http://laradock.io/contributing/).
|
|
@ -1,29 +1,23 @@
|
||||||
### Info:
|
### Info:
|
||||||
- Docker version (`$ docker --version`):
|
- Docker version (`$ docker --version`):
|
||||||
- Laradock commit (`$ git rev-parse HEAD`):
|
- Laradock commit (`$ git rev-parse HEAD`):
|
||||||
- System (`place x between the [ ]`):
|
- System info (Mac, PC, Linux):
|
||||||
- [ ] Mac
|
- System info disto/version:
|
||||||
- [ ] PC
|
|
||||||
- [ ] Linux
|
|
||||||
- Info:
|
|
||||||
|
|
||||||
### Issue:
|
### Issue:
|
||||||
##### What seems to be going wrong?
|
<!--- What seems to be wrong? -->
|
||||||
|
|
||||||
_____
|
_____
|
||||||
|
|
||||||
### Expected behavior:
|
### Expected behavior:
|
||||||
##### What should be happening instead?
|
<!--- What should happen instead? -->
|
||||||
|
|
||||||
_____
|
_____
|
||||||
|
|
||||||
### Reproduce:
|
### Reproduce:
|
||||||
##### How might we be able to reproduce the error?
|
<!--- How can we reproduce the error? -->
|
||||||
|
|
||||||
_____
|
_____
|
||||||
|
|
||||||
### Relevant Code:
|
### Relevant Code:
|
||||||
|
|
||||||
```
|
```
|
||||||
// place code here
|
// place a code sample here
|
||||||
```
|
```
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<!--- Thank you for contributing to Laradock -->
|
||||||
|
|
||||||
|
##### I completed the 3 steps below:
|
||||||
|
|
||||||
|
- [] 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 enjoyed my time contributing and making developer's life easier :)
|
|
@ -669,19 +669,19 @@ PHP-CLI 安装在 Workspace 容器,改变 PHP-CLI 版本你需要编辑 `works
|
||||||
<a name="Use-custom-Domain"></a>
|
<a name="Use-custom-Domain"></a>
|
||||||
### 使用自定义域名 (替换 Docker 的 IP)
|
### 使用自定义域名 (替换 Docker 的 IP)
|
||||||
|
|
||||||
假定你的自定义域名是 `laravel.dev`
|
假定你的自定义域名是 `laravel.test`
|
||||||
|
|
||||||
1 - 打开 `/etc/hosts` 文件添加以下内容,映射你的 localhost 地址 `127.0.0.1` 为 `laravel.dev` 域名
|
1 - 打开 `/etc/hosts` 文件添加以下内容,映射你的 localhost 地址 `127.0.0.1` 为 `laravel.test` 域名
|
||||||
```bash
|
```bash
|
||||||
127.0.0.1 laravel.dev
|
127.0.0.1 laravel.test
|
||||||
```
|
```
|
||||||
|
|
||||||
2 - 打开你的浏览器访问 `{http://laravel.dev}`
|
2 - 打开你的浏览器访问 `{http://laravel.test}`
|
||||||
|
|
||||||
你可以在 nginx 配置文件自定义服务器名称,如下:
|
你可以在 nginx 配置文件自定义服务器名称,如下:
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
server_name laravel.dev;
|
server_name laravel.test;
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="Enable-Global-Composer-Build-Install"></a>
|
<a name="Enable-Global-Composer-Build-Install"></a>
|
|
@ -0,0 +1,92 @@
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://s19.postimg.org/jblfytw9f/laradock-logo.jpg" alt="Laradock Logo"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">A Docker PHP development environment that facilitates running PHP Apps on Docker</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://travis-ci.org/laradock/laradock"><img src="https://travis-ci.org/laradock/laradock.svg?branch=master" alt="Build status"></a>
|
||||||
|
<a href="https://github.com/laradock/laradock/stargazers"><a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/laradock/backers/badge.svg" /></a> <a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/laradock/sponsors/badge.svg" /></a> <img src="https://img.shields.io/github/stars/laradock/laradock.svg" alt="GitHub stars"></a>
|
||||||
|
<a href="https://github.com/laradock/laradock/network"><img src="https://img.shields.io/github/forks/laradock/laradock.svg" alt="GitHub forks"></a>
|
||||||
|
<a href="https://github.com/laradock/laradock/issues"><img src="https://img.shields.io/github/issues/laradock/laradock.svg" alt="GitHub issues"></a>
|
||||||
|
<a href="https://raw.githubusercontent.com/laradock/laradock/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license"></a>
|
||||||
|
<a href="http://laradock.io/contributing"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="contributions welcome"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h4 align="center" style="color:#7d58c2">Use Docker First And Learn About It Later</h4>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://zalt.me"><img src="http://forthebadge.com/images/badges/built-by-developers.svg" alt="forthebadge" width="240" ></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="http://laradock.io">
|
||||||
|
<img src="https://s19.postimg.org/ecnn9vdw3/Screen_Shot_2017-08-01_at_5.08.54_AM.png" width=300px" alt="Laradock Docs"/>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
## Sponsors
|
||||||
|
|
||||||
|
Support this project by becoming a sponsor.
|
||||||
|
|
||||||
|
Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page, with a link to your website. [[Become a sponsor](https://opencollective.com/laradock#sponsor)]
|
||||||
|
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/0/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/1/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/2/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/3/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/3/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/4/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/4/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/5/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/5/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/6/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/6/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/7/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/7/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/8/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/8/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/9/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/9/avatar.svg"></a>
|
||||||
|
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
#### Core contributors:
|
||||||
|
- [Mahmoud Zalt](https://github.com/Mahmoudz) @mahmoudz | [Twitter](https://twitter.com/Mahmoud_Zalt) | [Site](http://zalt.me)
|
||||||
|
- [Bo-Yi Wu](https://github.com/appleboy) @appleboy | [Twitter](https://twitter.com/appleboy)
|
||||||
|
- [Philippe Trépanier](https://github.com/philtrep) @philtrep
|
||||||
|
- [Mike Erickson](https://github.com/mikeerickson) @mikeerickson
|
||||||
|
- [Dwi Fahni Denni](https://github.com/zeroc0d3) @zeroc0d3
|
||||||
|
- [Thor Erik](https://github.com/thorerik) @thorerik
|
||||||
|
- [Winfried van Loon](https://github.com/winfried-van-loon) @winfried-van-loon
|
||||||
|
- [TJ Miller](https://github.com/sixlive) @sixlive
|
||||||
|
- [Yu-Lung Shao (Allen)](https://github.com/bestlong) @bestlong
|
||||||
|
- [Milan Urukalo](https://github.com/urukalo) @urukalo
|
||||||
|
- [Vince Chu](https://github.com/vwchu) @vwchu
|
||||||
|
- [Huadong Zuo](https://github.com/zuohuadong) @zuohuadong
|
||||||
|
- Join us, by submitting 20 useful PR's.
|
||||||
|
|
||||||
|
#### Awesome contributors:
|
||||||
|
|
||||||
|
<a href="https://github.com/laradock/laradock/graphs/contributors"><img src="https://opencollective.com/laradock/contributors.svg?width=890" /></a>
|
||||||
|
|
||||||
|
|
||||||
|
## Donations
|
||||||
|
|
||||||
|
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
|
||||||
|
> Thanks in advance.
|
||||||
|
|
||||||
|
Donate directly via [Paypal](https://www.paypal.me/mzalt)
|
||||||
|
|
||||||
|
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/mzalt)
|
||||||
|
|
||||||
|
or become a backer on [Open Collective](https://opencollective.com/laradock#backer)
|
||||||
|
|
||||||
|
<a href="https://opencollective.com/laradock#backers" target="_blank"><img src="https://opencollective.com/laradock/backers.svg?width=890"></a>
|
||||||
|
|
||||||
|
or show your support via [Beerpay](https://beerpay.io/laradock/laradock)
|
||||||
|
|
||||||
|
[![Beerpay](https://beerpay.io/laradock/laradock/badge.svg?style=flat)](https://beerpay.io/laradock/laradock)
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE)
|
|
@ -3,3 +3,5 @@
|
||||||
/data
|
/data
|
||||||
.env
|
.env
|
||||||
/.project
|
/.project
|
||||||
|
.docker-sync
|
||||||
|
/jenkins/jenkins_home
|
||||||
|
|
43
.travis.yml
43
.travis.yml
|
@ -5,11 +5,48 @@ services:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- PHP_VERSION=56
|
|
||||||
- PHP_VERSION=70
|
|
||||||
- PHP_VERSION=71
|
|
||||||
- HUGO_VERSION=0.20.2
|
- HUGO_VERSION=0.20.2
|
||||||
|
|
||||||
|
- PHP_VERSION=56 BUILD_SERVICE=workspace
|
||||||
|
- PHP_VERSION=70 BUILD_SERVICE=workspace
|
||||||
|
- PHP_VERSION=71 BUILD_SERVICE=workspace
|
||||||
|
|
||||||
|
- PHP_VERSION=56 BUILD_SERVICE=php-fpm
|
||||||
|
- PHP_VERSION=70 BUILD_SERVICE=php-fpm
|
||||||
|
- PHP_VERSION=71 BUILD_SERVICE=php-fpm
|
||||||
|
|
||||||
|
- PHP_VERSION=hhvm BUILD_SERVICE=hhvm
|
||||||
|
|
||||||
|
# - PHP_VERSION=56 BUILD_SERVICE=php-worker
|
||||||
|
- PHP_VERSION=70 BUILD_SERVICE=php-worker
|
||||||
|
- PHP_VERSION=71 BUILD_SERVICE=php-worker
|
||||||
|
|
||||||
|
- PHP_VERSION=56 BUILD_SERVICE=mssql
|
||||||
|
- PHP_VERSION=70 BUILD_SERVICE=mssql
|
||||||
|
- PHP_VERSION=71 BUILD_SERVICE=mssql
|
||||||
|
|
||||||
|
- PHP_VERSION=56 BUILD_SERVICE=rethinkdb
|
||||||
|
- PHP_VERSION=70 BUILD_SERVICE=rethinkdb
|
||||||
|
- PHP_VERSION=71 BUILD_SERVICE=rethinkdb
|
||||||
|
|
||||||
|
- PHP_VERSION=56 BUILD_SERVICE=aerospike
|
||||||
|
- PHP_VERSION=70 BUILD_SERVICE=aerospike
|
||||||
|
- PHP_VERSION=71 BUILD_SERVICE=aerospike
|
||||||
|
|
||||||
|
- PHP_VERSION=NA BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb postgres postgres-postgis neo4j mongo redis"
|
||||||
|
- PHP_VERSION=NA BUILD_SERVICE="adminer phpmyadmin pgadmin"
|
||||||
|
- PHP_VERSION=NA BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 haproxy"
|
||||||
|
- PHP_VERSION=NA BUILD_SERVICE="kibana grafana laravel-echo-server"
|
||||||
|
# - PHP_VERSION=NA BUILD_SERVICE="aws"
|
||||||
|
|
||||||
|
# Installing a newer Docker version
|
||||||
|
before_install:
|
||||||
|
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||||
|
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||||
|
- sudo apt-get update
|
||||||
|
- sudo apt-get -y install docker-ce
|
||||||
|
- docker version
|
||||||
|
|
||||||
script: ./travis-build.sh
|
script: ./travis-build.sh
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
|
|
@ -13,8 +13,8 @@ If you have questions about how to use Laradock, please direct your questions to
|
||||||
|
|
||||||
## Found an Issue
|
## Found an Issue
|
||||||
|
|
||||||
If have an issue or you found a typo in the documentation, you can help us by
|
If you have an issue or you found a typo in the documentation, you can help us by
|
||||||
opnening an [Issue](https://github.com/laradock/laradock/issues).
|
opening an [Issue](https://github.com/laradock/laradock/issues).
|
||||||
|
|
||||||
**Steps to do before opening an Issue:**
|
**Steps to do before opening an Issue:**
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ opnening an [Issue](https://github.com/laradock/laradock/issues).
|
||||||
|
|
||||||
If your issue appears to be a bug, and hasn't been reported, then open a new issue.
|
If your issue appears to be a bug, and hasn't been reported, then open a new issue.
|
||||||
|
|
||||||
*This Help us to maximize the effort we can spend fixing issues and adding new
|
*This helps us maximize the effort we can spend fixing issues and adding new
|
||||||
features, by not reporting duplicate issues.*
|
features, by not reporting duplicate issues.*
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
|
||||||
|
|
||||||
## Support new Software (Add new Container)
|
## Support new Software (Add new Container)
|
||||||
|
|
||||||
* Forke the repo and clone the code.
|
* Fork the repo and clone the code.
|
||||||
|
|
||||||
* Create folder as the software name (example: `mysql` - `nginx`).
|
* Create folder as the software name (example: `mysql` - `nginx`).
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
|
||||||
|
|
||||||
## Edit supported Software (Edit a Container)
|
## Edit supported Software (Edit a Container)
|
||||||
|
|
||||||
* Forke the repo and clone the code.
|
* Fork the repo and clone the code.
|
||||||
|
|
||||||
* Open the software (container) folder (example: `mysql` - `nginx`).
|
* Open the software (container) folder (example: `mysql` - `nginx`).
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,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
|
||||||
|
@ -153,7 +155,6 @@ 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)
|
||||||
|
@ -173,14 +174,17 @@ The NGINX Log file is stored in the `logs/nginx` directory.
|
||||||
However to view the logs of all the other containers (MySQL, PHP-FPM,...) you can run this:
|
However to view the logs of all the other containers (MySQL, PHP-FPM,...) you can run this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker logs {container-name}
|
docker-compose logs {container-name}
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose logs -f {container-name}
|
||||||
```
|
```
|
||||||
|
|
||||||
More [options](https://docs.docker.com/compose/reference/logs/)
|
More [options](https://docs.docker.com/compose/reference/logs/)
|
||||||
|
|
||||||
```bash
|
|
||||||
docker logs -f {container-name}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -228,7 +232,7 @@ By default **PHP-FPM 7.0** is running.
|
||||||
php-fpm:
|
php-fpm:
|
||||||
build:
|
build:
|
||||||
context: ./php-fpm
|
context: ./php-fpm
|
||||||
dockerfile: Dockerfile-70
|
dockerfile: Dockerfile-56
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -311,9 +315,7 @@ It should be like this:
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
2 - Re-build the containers `docker-compose build workspace php-fpm`
|
2 - Open `laradock/workspace/xdebug.ini` and `laradock/php-fpm/xdebug.ini` and enable at least the following configurations:
|
||||||
|
|
||||||
3 - Open `laradock/workspace/xdebug.ini` and/or `laradock/php-fpm/xdebug.ini` and enable at least the following configurations:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
xdebug.remote_autostart=1
|
xdebug.remote_autostart=1
|
||||||
|
@ -321,11 +323,25 @@ xdebug.remote_enable=1
|
||||||
xdebug.remote_connect_back=1
|
xdebug.remote_connect_back=1
|
||||||
```
|
```
|
||||||
|
|
||||||
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm).
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
<a name="Setup remote debugging for PhpStorm on Linux"></a>
|
||||||
|
## Setup remote debugging for PhpStorm on Linux
|
||||||
|
|
||||||
|
- Make sure you have followed the steps above in the [Install Xdebug section](http://laradock.io/documentation/#install-xdebug).
|
||||||
|
|
||||||
|
- Make sure Xdebug accepts connections and listens on port 9000. (Should be default configuration).
|
||||||
|
|
||||||
|
![Debug Configuration](/images/photos/PHPStorm/linux/configuration/debugConfiguration.png "Debug Configuration").
|
||||||
|
|
||||||
|
- Create a server with name `laradock` (matches **PHP_IDE_CONFIG** key in environment file) and make sure to map project root path with server correctly.
|
||||||
|
|
||||||
|
![Server Configuration](/images/photos/PHPStorm/linux/configuration/serverConfiguration.png "Server Configuration").
|
||||||
|
|
||||||
|
- Start listening for debug connections, place a breakpoint and you are good to go !
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
@ -415,15 +431,35 @@ 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
|
||||||
|
|
||||||
|
@ -525,11 +561,18 @@ b) add a new service container by simply copy-paste this section below PHP-FPM c
|
||||||
```yaml
|
```yaml
|
||||||
php-worker:
|
php-worker:
|
||||||
build:
|
build:
|
||||||
context: ./php-fpm
|
context: ./php-worker
|
||||||
dockerfile: Dockerfile-70 # or Dockerfile-56, choose your PHP-FPM container setting
|
dockerfile: "Dockerfile-${PHP_VERSION}" #Dockerfile-71 or #Dockerfile-70 available
|
||||||
|
args:
|
||||||
|
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} #Optionally install PGSQL PHP drivers
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
command: php artisan queue:work
|
depends_on:
|
||||||
|
- workspace
|
||||||
|
extra_hosts:
|
||||||
|
- "dockerhost:${DOCKER_HOST_IP}"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
```
|
```
|
||||||
2 - Start everything up
|
2 - Start everything up
|
||||||
|
|
||||||
|
@ -551,13 +594,15 @@ docker-compose up -d php-worker
|
||||||
docker-compose up -d redis
|
docker-compose up -d redis
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> To execute redis commands, enter the redis container first `docker-compose exec redis bash` then enter the `redis-cli`.
|
||||||
|
|
||||||
2 - Open your Laravel's `.env` file and set the `REDIS_HOST` to `redis`
|
2 - Open your Laravel's `.env` file and set the `REDIS_HOST` to `redis`
|
||||||
|
|
||||||
```env
|
```env
|
||||||
REDIS_HOST=redis
|
REDIS_HOST=redis
|
||||||
```
|
```
|
||||||
|
|
||||||
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:
|
If you're using Laravel, and 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
|
```php
|
||||||
'redis' => [
|
'redis' => [
|
||||||
|
@ -797,19 +842,20 @@ docker-compose up -d elasticsearch
|
||||||
|
|
||||||
2 - Open your browser and visit the localhost on port **9200**: `http://localhost:9200`
|
2 - Open your browser and visit the localhost on port **9200**: `http://localhost:9200`
|
||||||
|
|
||||||
|
> The default username is `user` and the default password is `changeme`.
|
||||||
|
|
||||||
### Install ElasticSearch Plugin
|
### Install ElasticSearch Plugin
|
||||||
|
|
||||||
1 - Install the ElasticSearch plugin like [delete-by-query](https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html).
|
1 - Install an ElasticSearch plugin.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker exec {container-name} /usr/share/elasticsearch/bin/plugin install delete-by-query
|
docker-compose exec elasticsearch /usr/share/elasticsearch/bin/plugin install {plugin-name}
|
||||||
```
|
```
|
||||||
|
|
||||||
2 - Restart elasticsearch container
|
2 - Restart elasticsearch container
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker restart {container-name}
|
docker-compose restart elasticsearch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -906,6 +952,44 @@ docker-compose up -d minio
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Use-AWS"></a>
|
||||||
|
## Use AWS
|
||||||
|
|
||||||
|
1 - Configure AWS:
|
||||||
|
- make sure to add your SSH keys in aws/ssh_keys folder
|
||||||
|
|
||||||
|
2 - Run the Aws Container (`aws`) with the `docker-compose up` command. Example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d aws
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Use-Grafana"></a>
|
||||||
|
## Use Grafana
|
||||||
|
|
||||||
|
1 - Configure Grafana: Change Port using `GRAFANA_PORT` if you wish to. Default is port 3000.
|
||||||
|
|
||||||
|
2 - Run the Grafana Container (`grafana`) with the `docker-compose up`command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d grafana
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="CodeIgniter"></a>
|
<a name="CodeIgniter"></a>
|
||||||
|
|
||||||
|
@ -927,9 +1011,18 @@ 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`.
|
||||||
|
|
||||||
|
|
||||||
|
<a name="Install-Symfony"></a>
|
||||||
|
## Install Symfony
|
||||||
|
|
||||||
|
1 - Open the `.env` file and set `WORKSPACE_INSTALL_SYMFONY` to `true`.
|
||||||
|
|
||||||
|
2 - Run `docker-compose build workspace`, after the step above.
|
||||||
|
|
||||||
|
3 - The NGINX sites include a default config file for your Symfony project `symfony.conf.example`, so edit it and make sure the `root` is pointing to your project `web` directory.
|
||||||
|
|
||||||
|
4 - Run `docker-compose restart` if the container was already running, before the step above.
|
||||||
|
|
||||||
|
5 - Visit `symfony.test`
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Misc"></a>
|
<a name="Misc"></a>
|
||||||
|
@ -1001,6 +1094,23 @@ To change the default forwarded port for ssh:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Change-the-MySQL-Version"></a>
|
||||||
|
## Change the (MySQL) Version
|
||||||
|
By default **MySQL 8.0** is running.
|
||||||
|
|
||||||
|
MySQL 8.0 is a development release. You may prefer to use the latest stable version, or an even older release. If you wish, you can change the MySQL image that is used.
|
||||||
|
|
||||||
|
Open up your .env file and set the `MYSQL_VERSION` variable to the version you would like to install.
|
||||||
|
|
||||||
|
```
|
||||||
|
MYSQL_VERSION=5.7
|
||||||
|
```
|
||||||
|
|
||||||
|
Available versions are: 5.5, 5.6, 5.7, 8.0, or latest. See https://store.docker.com/images/mysql for more information.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1038,6 +1148,19 @@ The default username and password for the root MySQL user are `root` and `root `
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Create-Multiple-Databases"></a>
|
||||||
|
## Create Multiple Databases (MySQL)
|
||||||
|
|
||||||
|
Create `createdb.sql` from `mysql/docker-entrypoint-initdb.d/createdb.sql.example` in `mysql/docker-entrypoint-initdb.d/*` and add your SQL syntax as follow:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE DATABASE IF NOT EXISTS `your_db_1` COLLATE 'utf8_general_ci' ;
|
||||||
|
GRANT ALL ON `your_db_1`.* TO 'mysql_user'@'%' ;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Change-MySQL-port"></a>
|
<a name="Change-MySQL-port"></a>
|
||||||
|
@ -1061,21 +1184,21 @@ If you need <a href="#MySQL-access-from-host">MySQL access from your host</a>, d
|
||||||
<a name="Use-custom-Domain"></a>
|
<a name="Use-custom-Domain"></a>
|
||||||
## Use custom Domain (instead of the Docker IP)
|
## Use custom Domain (instead of the Docker IP)
|
||||||
|
|
||||||
Assuming your custom domain is `laravel.dev`
|
Assuming your custom domain is `laravel.test`
|
||||||
|
|
||||||
1 - Open your `/etc/hosts` file and map your localhost address `127.0.0.1` to the `laravel.dev` domain, by adding the following:
|
1 - Open your `/etc/hosts` file and map your localhost address `127.0.0.1` to the `laravel.test` domain, by adding the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
127.0.0.1 laravel.dev
|
127.0.0.1 laravel.test
|
||||||
```
|
```
|
||||||
|
|
||||||
2 - Open your browser and visit `{http://laravel.dev}`
|
2 - Open your browser and visit `{http://laravel.test}`
|
||||||
|
|
||||||
|
|
||||||
Optionally you can define the server name in the NGINX configuration file, like this:
|
Optionally you can define the server name in the NGINX configuration file, like this:
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
server_name laravel.dev;
|
server_name laravel.test;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -1239,11 +1362,11 @@ You are free to modify the `aliases.sh` as you see fit, adding your own aliases
|
||||||
<br>
|
<br>
|
||||||
a) open the `docker-compose.yml` file
|
a) open the `docker-compose.yml` file
|
||||||
<br>
|
<br>
|
||||||
b) search for the `INSTALL_AEROSPIKE_EXTENSION` argument under the Workspace Container
|
b) search for the `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_EXTENSION` argument under the PHP-FPM Container
|
d) search for the `INSTALL_AEROSPIKE` argument under the PHP-FPM Container
|
||||||
<br>
|
<br>
|
||||||
e) set it to `true`
|
e) set it to `true`
|
||||||
|
|
||||||
|
@ -1254,13 +1377,13 @@ It should be like this:
|
||||||
build:
|
build:
|
||||||
context: ./workspace
|
context: ./workspace
|
||||||
args:
|
args:
|
||||||
- INSTALL_AEROSPIKE_EXTENSION=true
|
- INSTALL_AEROSPIKE=true
|
||||||
...
|
...
|
||||||
php-fpm:
|
php-fpm:
|
||||||
build:
|
build:
|
||||||
context: ./php-fpm
|
context: ./php-fpm
|
||||||
args:
|
args:
|
||||||
- INSTALL_AEROSPIKE_EXTENSION=true
|
- INSTALL_AEROSPIKE=true
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1358,7 +1481,11 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
|
||||||
<a name="Speed-MacOS"></a>
|
<a name="Speed-MacOS"></a>
|
||||||
## Improve speed on MacOS
|
## Improve speed on MacOS
|
||||||
|
|
||||||
Sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:
|
Docker on the Mac [is slow](https://github.com/docker/for-mac/issues/77), at the time of writing. Especially for larger projects, this can be a problem. The problem is [older than March 2016](https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076) - as it's a such a long-running issue, we're including it in the docs here.
|
||||||
|
|
||||||
|
So since sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Workaround A: using dinghy
|
### Workaround A: using dinghy
|
||||||
|
|
||||||
|
@ -1378,9 +1505,99 @@ Quick Setup giude, (we recommend you check their docs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<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:
|
||||||
|
|
||||||
|
|
||||||
|
#### B.1: using the built in d4m-nfs integration
|
||||||
|
|
||||||
|
In simple terms, docker-sync creates a docker container with a copy of all the application files that can be accessed very quickly from the other containers.
|
||||||
|
On the other hand, docker-sync runs a process on the host machine that continuously tracks and updates files changes from the host to this intermediate container.
|
||||||
|
|
||||||
|
Out of the box, it comes pre-configured for OS X, but using it on Windows is very easy to set-up by modifying the `DOCKER_SYNC_STRATEGY` on the `.env`
|
||||||
|
|
||||||
|
##### Usage
|
||||||
|
|
||||||
|
Laradock comes with `sync.sh`, an optional bash script, that automates installing, running and stopping docker-sync. Note that to run the bash script you may need to change the permissions `chmod 755 sync.sh`
|
||||||
|
|
||||||
|
1) Configure your Laradock environment as you would normally do and test your application to make sure that your sites are running correctly.
|
||||||
|
|
||||||
|
2) Make sure to set `DOCKER_SYNC_STRATEGY` on the `.env`. Read the [syncing strategies](https://github.com/EugenMayer/docker-sync/wiki/8.-Strategies) for details.
|
||||||
|
```
|
||||||
|
# osx: 'native_osx' (default)
|
||||||
|
# windows: 'unison'
|
||||||
|
# linux: docker-sync not required
|
||||||
|
|
||||||
|
DOCKER_SYNC_STRATEGY=native_osx
|
||||||
|
```
|
||||||
|
|
||||||
|
2) Install the docker-sync gem on the host-machine:
|
||||||
|
```bash
|
||||||
|
./sync.sh install
|
||||||
|
```
|
||||||
|
3) Start docker-sync and the Laradock environment.
|
||||||
|
Specify the services you want to run, as you would normally do with `docker-compose up`
|
||||||
|
```bash
|
||||||
|
./sync.sh up nginx mysql
|
||||||
|
```
|
||||||
|
Please note that the first time docker-sync runs, it will copy all the files to the intermediate container and that may take a very long time (15min+).
|
||||||
|
4) To stop the environment and docker-sync do:
|
||||||
|
```bash
|
||||||
|
./sync.sh down
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Setting up Aliases (optional)
|
||||||
|
|
||||||
|
You may create bash profile aliases to avoid having to remember and type these commands for everyday development.
|
||||||
|
Add the following lines to your `~/.bash_profile`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
alias devup="cd /PATH_TO_LARADOCK/laradock; ./sync.sh up nginx mysql" #add your services
|
||||||
|
alias devbash="cd /PATH_TO_LARADOCK/laradock; ./sync.sh bash"
|
||||||
|
alias devdown="cd /PATH_TO_LARADOCK/laradock; ./sync.sh down"
|
||||||
|
```
|
||||||
|
|
||||||
|
Now from any location on your machine, you can simply run `devup`, `devbash` and `devdown`.
|
||||||
|
|
||||||
|
|
||||||
|
##### Additional Commands
|
||||||
|
|
||||||
|
Opening bash on the workspace container (to run artisan for example):
|
||||||
|
```bash
|
||||||
|
./sync.sh bash
|
||||||
|
```
|
||||||
|
Manually triggering the synchronization of the files:
|
||||||
|
```bash
|
||||||
|
./sync.sh sync
|
||||||
|
```
|
||||||
|
Removing and cleaning up the files and the docker-sync container. Use only if you want to rebuild or remove docker-sync completely. The files on the host will be kept untouched.
|
||||||
|
```bash
|
||||||
|
./sync.sh clean
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
##### Additional Notes
|
||||||
|
|
||||||
|
- You may run laradock with or without docker-sync at any time using with the same `.env` and `docker-compose.yml`, because the configuration is overridden automatically when docker-sync is used.
|
||||||
|
- You may inspect the `sync.sh` script to learn each of the commands and even add custom ones.
|
||||||
|
- If a container cannot access the files on docker-sync, you may need to set a user on the Dockerfile of that container with an id of 1000 (this is the UID that nginx and php-fpm have configured on laradock). Alternatively, you may change the permissions to 777, but this is **not** recommended.
|
||||||
|
|
||||||
|
Visit the [docker-sync documentation](https://github.com/EugenMayer/docker-sync/wiki) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
#### B.2: using the d4m-nfs tool
|
||||||
|
|
||||||
[D4m-nfs](https://github.com/IFSight/d4m-nfs) automatically mount NFS volume instead of osxfs one.
|
[D4m-nfs](https://github.com/IFSight/d4m-nfs) automatically mount NFS volume instead of osxfs one.
|
||||||
|
|
||||||
1) Update the Docker [File Sharing] preferences:
|
1) Update the Docker [File Sharing] preferences:
|
||||||
|
@ -1420,17 +1637,10 @@ docker-compose up ...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Other good workarounds:
|
|
||||||
|
|
||||||
- [docker-sync](https://github.com/EugenMayer/docker-sync)
|
|
||||||
- Add more here..
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
More details about this issue [here](https://github.com/docker/for-mac/issues/77).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1515,3 +1725,7 @@ This error sometimes happens because your Laravel application isn't running on t
|
||||||
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
|
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
|
||||||
* Option B
|
* Option B
|
||||||
1. Change the `DB_HOST` value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as `mysql`
|
1. Change the `DB_HOST` value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as `mysql`
|
||||||
|
|
||||||
|
## I get stuck when building nginx on `fetch http://mirrors.aliyun.com/alpine/v3.5/main/x86_64/APKINDEX.tar.gz`
|
||||||
|
|
||||||
|
As stated on [#749](https://github.com/laradock/laradock/issues/749#issuecomment-293296687), removing the line `RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories` from `nginx/Dockerfile` solves the problem.
|
||||||
|
|
|
@ -112,18 +112,20 @@ Your folder structure should look like this:
|
||||||
|
|
||||||
2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains.
|
2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains.
|
||||||
|
|
||||||
Laradock by default includes `project-1.conf` and `project-2.conf` as working samples.
|
Laradock by default includes `app.conf.example`, `laravel.conf.example` and `symfony.conf.example` as working samples.
|
||||||
|
|
||||||
3 - change the default names `project-n`:
|
3 - change the default names `*.conf`:
|
||||||
|
|
||||||
You can rename the config files, project folders and domains as you like, just make sure the `root` in the config files, is pointing to the correct project folder name.
|
You can rename the config files, project folders and domains as you like, just make sure the `root` in the config files, is pointing to the correct project folder name.
|
||||||
|
|
||||||
4 - Add the domains to the **hosts** files.
|
4 - Add the domains to the **hosts** files.
|
||||||
|
|
||||||
```
|
```
|
||||||
127.0.0.1 project-1.dev
|
127.0.0.1 project-1.test
|
||||||
127.0.0.1 project-2.dev
|
127.0.0.1 project-2.test
|
||||||
|
...
|
||||||
```
|
```
|
||||||
|
If you use Chrome 63 or above for development, don't use `.dev`. [Why?](https://laravel-news.com/chrome-63-now-forces-dev-domains-https). Instead use `.localhost`, `.invalid`, `.test`, or `.example`.
|
||||||
|
|
||||||
> **Now jump to the [Usage](#Usage) section.**
|
> **Now jump to the [Usage](#Usage) section.**
|
||||||
|
|
||||||
|
@ -145,6 +147,10 @@ If you are using **Docker Toolbox** (VM), do one of the following:
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
We recommend using a Docker version which is newer than 1.13.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
>**Warning:** If you used an older version of Laradock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent as much errors as possible.
|
>**Warning:** If you used an older version of Laradock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent as much errors as possible.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
@ -157,6 +163,7 @@ cp env-example .env
|
||||||
|
|
||||||
You can edit the `.env` file to chose 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 chose 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.
|
||||||
|
|
||||||
|
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`
|
2 - Build the enviroment and run it using `docker-compose`
|
||||||
|
|
||||||
|
@ -207,6 +214,4 @@ DB_HOST=mysql
|
||||||
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
|
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`. But first don't
|
5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.test/` and `http://project-2.test/`.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ weight: 4
|
||||||
|
|
||||||
* [Production Setup on Digital Ocean](#Digital-Ocean)
|
* [Production Setup on Digital Ocean](#Digital-Ocean)
|
||||||
* [PHPStorm XDebug Setup](#PHPStorm-Debugging)
|
* [PHPStorm XDebug Setup](#PHPStorm-Debugging)
|
||||||
|
* [Running Laravel Dusk Test](#Laravel-Dusk)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,6 +56,10 @@ $root@server:~/laravel/ cd laradock
|
||||||
$root@server:~/laravel/laradock# curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
|
$root@server:~/laravel/laradock# curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
|
||||||
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
||||||
```
|
```
|
||||||
|
## Enter the laradock folder and rename env-example to .env.
|
||||||
|
```
|
||||||
|
$root@server:~/laravel/laradock# cp env-example .env
|
||||||
|
```
|
||||||
|
|
||||||
## Create Your Laradock Containers
|
## Create Your Laradock Containers
|
||||||
|
|
||||||
|
@ -138,8 +143,8 @@ And add `server_name` (your custom domain)
|
||||||
## Rebuild Your Nginx
|
## Rebuild Your Nginx
|
||||||
|
|
||||||
```
|
```
|
||||||
$root@server:~/laravel/laradock/nginx# docker-compose down
|
$root@server:~/laravel/laradock# docker-compose down
|
||||||
$root@server:~/laravel/laradock/nginx# docker-compose build nginx
|
$root@server:~/laravel/laradock# docker-compose build nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
## Re Run Your Containers MYSQL and NGINX
|
## Re Run Your Containers MYSQL and NGINX
|
||||||
|
@ -322,6 +327,7 @@ Set the following variables:
|
||||||
- `laradock/php-fpm/xdebug.ini`
|
- `laradock/php-fpm/xdebug.ini`
|
||||||
|
|
||||||
Set the following variables:
|
Set the following variables:
|
||||||
|
|
||||||
```
|
```
|
||||||
xdebug.remote_autostart=1
|
xdebug.remote_autostart=1
|
||||||
xdebug.remote_enable=1
|
xdebug.remote_enable=1
|
||||||
|
@ -332,34 +338,39 @@ xdebug.cli_color=1
|
||||||
|
|
||||||
<a name="InstallCleanHouse"></a>
|
<a name="InstallCleanHouse"></a>
|
||||||
### Need to clean house first?
|
### Need to clean house first?
|
||||||
|
|
||||||
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
|
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
|
||||||
Here are a few things I use to clean things up.
|
Here are a few things I use to clean things up.
|
||||||
|
|
||||||
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
|
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
|
||||||
|
|
||||||
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
|
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
|
||||||
|
|
||||||
- Delete all images containing `laradock`.
|
- Delete all images containing `laradock`.
|
||||||
|
|
||||||
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
|
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
|
||||||
**Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc.
|
**Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc.
|
||||||
**Note:** Some may fail with:
|
**Note:** Some may fail with:
|
||||||
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
||||||
|
|
||||||
- I added this to my `.bashrc` to remove orphaned images.
|
- I added this to my `.bashrc` to remove orphaned images.
|
||||||
```
|
|
||||||
dclean() {
|
|
||||||
processes=`docker ps -q -f status=exited`
|
|
||||||
if [ -n "$processes" ]; thend
|
|
||||||
docker rm $processes
|
|
||||||
fi
|
|
||||||
|
|
||||||
images=`docker images -q -f dangling=true`
|
```
|
||||||
if [ -n "$images" ]; then
|
dclean() {
|
||||||
docker rmi $images
|
processes=`docker ps -q -f status=exited`
|
||||||
fi
|
if [ -n "$processes" ]; then
|
||||||
}
|
docker rm $processes
|
||||||
```
|
fi
|
||||||
|
|
||||||
|
images=`docker images -q -f dangling=true`
|
||||||
|
if [ -n "$images" ]; then
|
||||||
|
docker rmi $images
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
|
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
|
||||||
|
|
||||||
```
|
```
|
||||||
# remove laravel* containers
|
# remove laravel* containers
|
||||||
# remove laravel_* images
|
# remove laravel_* images
|
||||||
|
@ -402,14 +413,14 @@ laradock_php-fpm_1 php-fpm Up 9000/tcp
|
||||||
laradock_volumes_data_1 true Exit 0
|
laradock_volumes_data_1 true Exit 0
|
||||||
laradock_volumes_source_1 true Exit 0
|
laradock_volumes_source_1 true Exit 0
|
||||||
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
|
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="enablePhpXdebug"></a>
|
<a name="enablePhpXdebug"></a>
|
||||||
## Enable xDebug on php-fpm
|
## Enable xDebug on php-fpm
|
||||||
|
|
||||||
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
|
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
|
||||||
You should see something like the following:
|
You should see something like the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
xDebug status
|
xDebug status
|
||||||
laradock_php-fpm_1
|
laradock_php-fpm_1
|
||||||
|
@ -418,6 +429,7 @@ Copyright (c) 1997-2016 The PHP Group
|
||||||
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
||||||
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
||||||
```
|
```
|
||||||
|
|
||||||
Other commands include `.php-fpm/xdebug start | stop`.
|
Other commands include `.php-fpm/xdebug start | stop`.
|
||||||
|
|
||||||
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
|
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
|
||||||
|
@ -426,6 +438,7 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
|
||||||
|
|
||||||
<a name="InstallPHPStormConfigs"></a>
|
<a name="InstallPHPStormConfigs"></a>
|
||||||
## PHPStorm Settings
|
## PHPStorm Settings
|
||||||
|
|
||||||
- Here are some settings that are known to work:
|
- Here are some settings that are known to work:
|
||||||
- `Settings/BuildDeploymentConnection`
|
- `Settings/BuildDeploymentConnection`
|
||||||
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)
|
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)
|
||||||
|
@ -543,4 +556,330 @@ Assuming that you are in laradock folder, type:
|
||||||
- ![ConnectionSSHAuth](/images/photos/KiTTY/ConnectionSSHAuth.png)
|
- ![ConnectionSSHAuth](/images/photos/KiTTY/ConnectionSSHAuth.png)
|
||||||
- ![TerminalShell](/images/photos/KiTTY/TerminalShell.png)
|
- ![TerminalShell](/images/photos/KiTTY/TerminalShell.png)
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="Laravel-Dusk"></a>
|
||||||
|
# Running Laravel Dusk Tests
|
||||||
|
|
||||||
|
- [Option 1: Without Selenium](#option1-dusk)
|
||||||
|
- [Option 2: With Selenium](#option2-dusk)
|
||||||
|
|
||||||
|
<a name="option1-dusk"></a>
|
||||||
|
## Option 1: Without Selenium
|
||||||
|
|
||||||
|
- [Intro](#option1-dusk-intro)
|
||||||
|
- [Workspace Setup](#option1-workspace-setup)
|
||||||
|
- [Application Setup](#option1-application-setup)
|
||||||
|
- [Choose Chrome Driver Version (Optional)](#option1-choose-chrome-driver-version)
|
||||||
|
- [Run Dusk Tests](#option1-run-dusk-tests)
|
||||||
|
|
||||||
|
<a name="option1-dusk-intro"></a>
|
||||||
|
### Intro
|
||||||
|
|
||||||
|
This is a guide to run Dusk tests in your `workspace` container with headless
|
||||||
|
google-chrome and chromedriver. It has been tested with Laravel 5.4 and 5.5.
|
||||||
|
|
||||||
|
<a name="option1-workspace-setup"></a>
|
||||||
|
### Workspace Setup
|
||||||
|
|
||||||
|
Update your .env with following entries:
|
||||||
|
|
||||||
|
```
|
||||||
|
...
|
||||||
|
# Install Laravel installer bin to setup demo app
|
||||||
|
WORKSPACE_INSTALL_LARAVEL_INSTALLER=true
|
||||||
|
...
|
||||||
|
# Install all the necessary dependencies for running Dusk tests
|
||||||
|
WORKSPACE_INSTALL_DUSK_DEPS=true
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run below to build your workspace.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose build workspace
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="option1-application-setup"></a>
|
||||||
|
### Application Setup
|
||||||
|
|
||||||
|
Run a `workspace` container and you will be inside the container at `/var/www` directory.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose run workspace bash
|
||||||
|
|
||||||
|
/var/www#> _
|
||||||
|
```
|
||||||
|
|
||||||
|
Create new Laravel application named `dusk-test` and install Laravel Dusk package.
|
||||||
|
|
||||||
|
```
|
||||||
|
/var/www> laravel new dusk-test
|
||||||
|
/var/www> cd dusk-test
|
||||||
|
/var/www/dusk-test> composer require --dev laravel/dusk
|
||||||
|
/var/www/dusk-test> php artisan dusk:install
|
||||||
|
```
|
||||||
|
|
||||||
|
Create `.env.dusk.local` by copying from `.env` file.
|
||||||
|
|
||||||
|
```
|
||||||
|
/var/www/dusk-test> cp .env .env.dusk.local
|
||||||
|
```
|
||||||
|
|
||||||
|
Update the `APP_URL` entry in `.env.dusk.local` to local Laravel server.
|
||||||
|
|
||||||
|
```
|
||||||
|
APP_URL=http://localhost:8000
|
||||||
|
```
|
||||||
|
|
||||||
|
You will need to run chromedriver with `headless` and `no-sandbox` flag. In Laravel Dusk 2.x it is
|
||||||
|
already set `headless` so you just need to add `no-sandbox` flag. If you on previous version 1.x,
|
||||||
|
you will need to update your `DustTestCase#driver` as shown below.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
<?php
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
abstract class DuskTestCase extends BaseTestCase
|
||||||
|
{
|
||||||
|
...
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update chrome driver with below flags
|
||||||
|
*/
|
||||||
|
protected function driver()
|
||||||
|
{
|
||||||
|
$options = (new ChromeOptions)->addArguments([
|
||||||
|
'--disable-gpu',
|
||||||
|
'--headless',
|
||||||
|
'--no-sandbox'
|
||||||
|
]);
|
||||||
|
|
||||||
|
return RemoteWebDriver::create(
|
||||||
|
'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
|
||||||
|
ChromeOptions::CAPABILITY, $options
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="option1-choose-chrome-driver-version"></a>
|
||||||
|
### Choose Chrome Driver Version (Optional)
|
||||||
|
|
||||||
|
You could choose to use either:
|
||||||
|
|
||||||
|
1. Chrome Driver shipped with Laravel Dusk. (Default)
|
||||||
|
2. Chrome Driver installed in `workspace` container. (Required tweak on DuskTestCase class)
|
||||||
|
|
||||||
|
For Laravel 2.x, you need to update `DuskTestCase#prepare` method if you wish to go with option #2.
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
...
|
||||||
|
abstract class DuskTestCase extends BaseTestCase
|
||||||
|
{
|
||||||
|
...
|
||||||
|
public static function prepare()
|
||||||
|
{
|
||||||
|
// Only add this line if you wish to use chrome driver installed in workspace container.
|
||||||
|
// You might want to read the file path from env file.
|
||||||
|
static::useChromedriver('/usr/local/bin/chromedriver');
|
||||||
|
|
||||||
|
static::startChromeDriver();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For Laravel 1.x, you need to add `DuskTestCase#buildChromeProcess` method if you wish to go with option #2.
|
||||||
|
|
||||||
|
```
|
||||||
|
<?php
|
||||||
|
|
||||||
|
...
|
||||||
|
use Symfony\Component\Process\ProcessBuilder;
|
||||||
|
|
||||||
|
abstract class DuskTestCase extends BaseTestCase
|
||||||
|
{
|
||||||
|
...
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only add this method if you wish to use chrome driver installed in workspace container
|
||||||
|
*/
|
||||||
|
protected static function buildChromeProcess()
|
||||||
|
{
|
||||||
|
return (new ProcessBuilder())
|
||||||
|
->setPrefix('chromedriver')
|
||||||
|
->getProcess()
|
||||||
|
->setEnv(static::chromeEnvironment());
|
||||||
|
}
|
||||||
|
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="option1-run-dusk-tests"></a>
|
||||||
|
### Run Dusk Tests
|
||||||
|
|
||||||
|
Run local server in `workspace` container and run Dusk tests.
|
||||||
|
|
||||||
|
```
|
||||||
|
# alias to run Laravel server in the background (php artisan serve --quiet &)
|
||||||
|
/var/www/dusk-test> serve
|
||||||
|
# alias to run Dusk tests (php artisan dusk)
|
||||||
|
/var/www/dusk-test> dusk
|
||||||
|
|
||||||
|
PHPUnit 6.4.0 by Sebastian Bergmann and contributors.
|
||||||
|
|
||||||
|
. 1 / 1 (100%)
|
||||||
|
|
||||||
|
Time: 837 ms, Memory: 6.00MB
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="option2-dusk"></a>
|
||||||
|
## Option 2: With Selenium
|
||||||
|
|
||||||
|
- [Intro](#dusk-intro)
|
||||||
|
- [DNS Setup](#dns-setup)
|
||||||
|
- [Docker Compose Setup](#docker-compose)
|
||||||
|
- [Laravel Dusk Setup](#laravel-dusk-setup)
|
||||||
|
- [Running Laravel Dusk Tests](#running-tests)
|
||||||
|
|
||||||
|
<a name="dusk-intro"></a>
|
||||||
|
### Intro
|
||||||
|
Setting up Laravel Dusk tests to run with Laradock appears be something that
|
||||||
|
eludes most Laradock users. This guide is designed to show you how to wire them
|
||||||
|
up to work together. This guide is written with macOS and Linux in mind. As such,
|
||||||
|
it's only been tested on macOS. Feel free to create pull requests to update the guide
|
||||||
|
for Windows-specific instructions.
|
||||||
|
|
||||||
|
This guide assumes you know how to use a DNS forwarder such as `dnsmasq` or are comfortable
|
||||||
|
with editing the `/etc/hosts` file for one-off DNS changes.
|
||||||
|
|
||||||
|
<a name="dns-setup"></a>
|
||||||
|
### DNS Setup
|
||||||
|
According to RFC-2606, only four TLDs are reserved for local testing[^1]:
|
||||||
|
|
||||||
|
- `.test`
|
||||||
|
- `.example`
|
||||||
|
- `.invalid`
|
||||||
|
- `.localhost`
|
||||||
|
|
||||||
|
A common TLD used for local development is `.dev`, but newer versions of Google
|
||||||
|
Chrome (such as the one bundled with the Selenium Docker image), will fail to
|
||||||
|
resolve that DNS as there will appear to be a name collision.
|
||||||
|
|
||||||
|
The recommended extension is `.test` for your Laravel web apps because you're
|
||||||
|
running tests. Using a DNS forwarder such as `dnsmasq` or by editing the `/etc/hosts`
|
||||||
|
file, configure the host to point to `localhost`.
|
||||||
|
|
||||||
|
For example, in your `/etc/hosts` file:
|
||||||
|
```
|
||||||
|
##
|
||||||
|
# Host Database
|
||||||
|
#
|
||||||
|
# localhost is used to configure the loopback interface
|
||||||
|
# when the system is booting. Do not change this entry.
|
||||||
|
##
|
||||||
|
127.0.0.1 localhost
|
||||||
|
255.255.255.255 broadcasthost
|
||||||
|
::1 localhost
|
||||||
|
127.0.0.1 myapp.test
|
||||||
|
```
|
||||||
|
|
||||||
|
This will ensure that when navigating to `myapp.test`, it will route the
|
||||||
|
request to `127.0.0.1` which will be handled by Nginx in Laradock.
|
||||||
|
|
||||||
|
<a name="docker-compose"></a>
|
||||||
|
### Docker Compose setup
|
||||||
|
In order to make the Selenium container talk to the Nginx container appropriately,
|
||||||
|
the `docker-compose.yml` needs to be edited to accommodate this. Make the following
|
||||||
|
changes:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
...
|
||||||
|
selenium:
|
||||||
|
...
|
||||||
|
depends_on:
|
||||||
|
- nginx
|
||||||
|
links:
|
||||||
|
- nginx:<your_domain>
|
||||||
|
```
|
||||||
|
|
||||||
|
This allows network communication between the Nginx and Selenium containers
|
||||||
|
and it also ensures that when starting the Selenium container, the Nginx
|
||||||
|
container starts up first unless it's already running. This allows
|
||||||
|
the Selenium container to make requests to the Nginx container, which is
|
||||||
|
necessary for running Dusk tests. These changes also link the `nginx` environment
|
||||||
|
variable to the domain you wired up in your hosts file.
|
||||||
|
|
||||||
|
<a name="laravel-dusk-setup"></a>
|
||||||
|
### Laravel Dusk Setup
|
||||||
|
|
||||||
|
In order to make Laravel Dusk make the proper request to the Selenium container,
|
||||||
|
you have to edit the `DuskTestCase.php` file that's provided on the initial
|
||||||
|
installation of Laravel Dusk. The change you have to make deals with the URL the
|
||||||
|
Remote Web Driver attempts to use to set up the Selenium session.
|
||||||
|
|
||||||
|
One recommendation for this is to add a separate config option in your `.env.dusk.local`
|
||||||
|
so it's still possible to run your Dusk tests locally should you want to.
|
||||||
|
|
||||||
|
#### .env.dusk.local
|
||||||
|
```
|
||||||
|
...
|
||||||
|
USE_SELENIUM=true
|
||||||
|
```
|
||||||
|
|
||||||
|
#### DuskTestCase.php
|
||||||
|
```php
|
||||||
|
abstract class DuskTestCase extends BaseTestCase
|
||||||
|
{
|
||||||
|
...
|
||||||
|
protected function driver()
|
||||||
|
{
|
||||||
|
if (env('USE_SELENIUM', 'false') == 'true') {
|
||||||
|
return RemoteWebDriver::create(
|
||||||
|
'http://selenium:4444/wd/hub', DesiredCapabilities::chrome()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return RemoteWebDriver::create(
|
||||||
|
'http://localhost:9515', DesiredCapabilities::chrome()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="running-tests"></a>
|
||||||
|
### Running Laravel Dusk Tests
|
||||||
|
|
||||||
|
Now that you have everything set up, to run your Dusk tests, you have to SSH
|
||||||
|
into the workspace container as you normally would:
|
||||||
|
```docker-compose exec --user=laradock workspace bash```
|
||||||
|
|
||||||
|
Once inside, you can change directory to your application and run:
|
||||||
|
|
||||||
|
```php artisan dusk```
|
||||||
|
|
||||||
|
One way to make this easier from your project is to create a helper script. Here's one such example:
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
LARADOCK_HOME="path/to/laradock"
|
||||||
|
|
||||||
|
pushd ${LARADOCK_HOME}
|
||||||
|
|
||||||
|
docker-compose exec --user=laradock workspace bash -c "cd my-project && php artisan dusk && exit"
|
||||||
|
```
|
||||||
|
|
||||||
|
This invokes the Dusk command from inside the workspace container but when the script completes
|
||||||
|
execution, it returns your session to your project directory.
|
||||||
|
|
||||||
|
[^1]: [Don't Use .dev for Development](https://iyware.com/dont-use-dev-for-development/)
|
||||||
|
|
|
@ -83,17 +83,21 @@ In adhering to the separation of concerns principle as promoted by Docker, Larad
|
||||||
You can turn On/Off as many instances of as any container without worrying about the configurations, everything works like a charm.
|
You can turn On/Off as many instances of as any container without worrying about the configurations, everything works like a charm.
|
||||||
|
|
||||||
- **Database Engines:**
|
- **Database Engines:**
|
||||||
MySQL - MariaDB - Percona - MongoDB - Neo4j - RethinkDB - MSSQL - PostgreSQL - Postgres Postgis.
|
MySQL - MariaDB - Percona - MongoDB - Neo4j - RethinkDB - MSSQL - PostgreSQL - Postgres-PostGIS.
|
||||||
|
- **Database Management:**
|
||||||
|
PhpMyAdmin - Adminer - PgAdmin
|
||||||
- **Cache Engines:**
|
- **Cache Engines:**
|
||||||
Redis - Memcached - Aerospike
|
Redis - Memcached - Aerospike
|
||||||
- **PHP Servers:**
|
- **PHP Servers:**
|
||||||
NGINX - Apache2 - Caddy
|
NGINX - Apache2 - Caddy
|
||||||
- **PHP Compilers:**
|
- **PHP Compilers:**
|
||||||
PHP FPM - HHVM
|
PHP FPM - HHVM
|
||||||
- **Message Queuing:**
|
- **Message Queueing:**
|
||||||
Beanstalkd - Beanstalkd Console - RabbitMQ - RabbitMQ Console - PHP Worker
|
Beanstalkd - RabbitMQ - PHP Worker
|
||||||
- **Tools:**
|
- **Queueing Management:**
|
||||||
HAProxy - Jenkins - ElasticSearch - Selenium - Certbot - Mailhog - Minio - Varnish - PhpMyAdmin - Adminer - PgAdmin - MailHog - [Blackfire](https://blackfire.io)...
|
Beanstalkd Console - RabbitMQ Console
|
||||||
|
- **Random Tools:**
|
||||||
|
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - 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.
|
||||||
|
@ -108,10 +112,30 @@ You can choose, which tools to install in your workspace container and other con
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If you can't find your Software in the list, build it yourself and sumit it. Contributions are welcomed :)
|
If you can't find your Software in the list, build it yourself and submit it. Contributions are welcomed :)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Sponsors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Support this project by becoming a sponsor.
|
||||||
|
|
||||||
|
Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page, with a link to your website. [[Become a sponsor](https://opencollective.com/laradock#sponsor)]
|
||||||
|
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/0/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/1/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/2/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/3/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/3/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/4/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/4/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/5/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/5/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/6/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/6/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/7/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/7/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/8/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/8/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/9/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/9/avatar.svg"></a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -148,7 +172,7 @@ Most importantly Docker can run on Development and on Production (same environme
|
||||||
|
|
||||||
What's better than a **Demo Video**:
|
What's better than a **Demo Video**:
|
||||||
|
|
||||||
- Laradock v5.* (soon or never)
|
- Laradock v5.* (should be next!)
|
||||||
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
||||||
- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
|
- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
|
||||||
- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
||||||
|
@ -166,3 +190,25 @@ What's better than a **Demo Video**:
|
||||||
You are welcome to join our chat room on Gitter.
|
You are welcome to join our chat room on Gitter.
|
||||||
|
|
||||||
[![Gitter](https://badges.gitter.im/Laradock/laradock.svg)](https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
[![Gitter](https://badges.gitter.im/Laradock/laradock.svg)](https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="Donations"></a>
|
||||||
|
## Donations
|
||||||
|
|
||||||
|
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
|
||||||
|
> Thanks in advance.
|
||||||
|
|
||||||
|
Donate directly via [Paypal](https://www.paypal.me/mzalt)
|
||||||
|
|
||||||
|
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/mzalt)
|
||||||
|
|
||||||
|
or become a backer on [Open Collective](https://opencollective.com/laradock#backer)
|
||||||
|
|
||||||
|
<a href="https://opencollective.com/laradock#backers" target="_blank"><img src="https://opencollective.com/laradock/backers.svg?width=890"></a>
|
||||||
|
|
||||||
|
or show your support via [Beerpay](https://beerpay.io/laradock/laradock)
|
||||||
|
|
||||||
|
[![Beerpay](https://beerpay.io/laradock/laradock/badge.svg?style=flat)](https://beerpay.io/laradock/laradock)
|
||||||
|
|
|
@ -14,5 +14,6 @@ These Docker Compose projects have piqued our interest:
|
||||||
* [MageDock](https://github.com/ojhaujjwal/magedock) by [Ujjwal Ojha](https://github.com/ojhaujjwal)
|
* [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)
|
* [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)
|
* [NoDock](https://github.com/Osedea/nodock) by [Osedea](https://github.com/Osedea)
|
||||||
|
* [Dockery](https://github.com/taufek/dockery) by [Taufek](https://github.com/Taufek)
|
||||||
|
|
||||||
If you want your project listed here, please open an issue.
|
If you want your project listed here, please open an issue.
|
||||||
|
|
|
@ -20,11 +20,25 @@
|
||||||
<main class="main">
|
<main class="main">
|
||||||
<div class="drawer">
|
<div class="drawer">
|
||||||
{{ partial "drawer" . }}
|
{{ partial "drawer" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<article class="article">
|
<article class="article">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
|
|
||||||
|
<!-- ------------------------------------------------------------------------- -->
|
||||||
|
<!-- Google Ads -->
|
||||||
|
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||||
|
<!-- Laradock Horizontal -->
|
||||||
|
<ins class="adsbygoogle"
|
||||||
|
style="display:inline-block;width:890px;height:100px"
|
||||||
|
data-ad-client="ca-pub-9826129398689742"
|
||||||
|
data-ad-slot="2340256024"></ins>
|
||||||
|
<script>
|
||||||
|
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||||
|
</script>
|
||||||
|
<!-- ------------------------------------------------------------------------- -->
|
||||||
|
|
||||||
|
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
|
||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,20 @@
|
||||||
|
|
||||||
<article class="article">
|
<article class="article">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
|
<!-- ------------------------------------------------------------------------- -->
|
||||||
|
<!-- Google Ads -->
|
||||||
|
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||||
|
<!-- Laradock Horizontal -->
|
||||||
|
<ins class="adsbygoogle"
|
||||||
|
style="display:inline-block;width:890px;height:100px"
|
||||||
|
data-ad-client="ca-pub-9826129398689742"
|
||||||
|
data-ad-slot="2340256024"></ins>
|
||||||
|
<script>
|
||||||
|
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||||
|
</script>
|
||||||
|
<!-- ------------------------------------------------------------------------- -->
|
||||||
|
|
||||||
{{ range where .Site.Pages "Type" "index" }}
|
{{ range where .Site.Pages "Type" "index" }}
|
||||||
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
|
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="{{ $.Site.BaseURL }}{{ . }}">
|
<img src="{{ $.Site.BaseURL }}{{ . }}">
|
||||||
</div>
|
</div>
|
||||||
|
Laradock
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<!--<div class="name">-->
|
<!--<div class="name">-->
|
||||||
<!--<strong>{{ .Site.Title }} {{ with .Site.Params.version }}<span class="version">{{ . }}</span>{{ end }}</strong>-->
|
<!--<strong>{{ .Site.Title }} {{ with .Site.Params.version }}<span class="version">{{ . }}</span>{{ end }}</strong>-->
|
||||||
|
@ -42,18 +43,39 @@
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if isset .Site.Params "author" }}
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<!-- ------------------------------------------------------------------------- -->
|
||||||
|
<!-- Google Ads -->
|
||||||
|
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||||
|
<!-- Laradock Vertical -->
|
||||||
|
<ins class="adsbygoogle"
|
||||||
|
style="display:inline-block;width:237px;height:600px"
|
||||||
|
data-ad-client="ca-pub-9826129398689742"
|
||||||
|
data-ad-slot="9891442983"></ins>
|
||||||
|
<script>
|
||||||
|
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||||
|
</script>
|
||||||
|
<!-- ------------------------------------------------------------------------- -->
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<!--{{ if isset .Site.Params "author" }}-->
|
||||||
<!--<hr>-->
|
<!--<hr>-->
|
||||||
<!--<span class="section">The author</span>-->
|
<!--<span class="section">The author</span>-->
|
||||||
|
<!---->
|
||||||
<ul>
|
<!--<ul>-->
|
||||||
{{ with .Site.Social.twitter }}
|
<!--{{ with .Site.Social.twitter }}-->
|
||||||
<li>
|
<!--<li>-->
|
||||||
<a href="https://twitter.com/{{ . }}" target="_blank" title="@{{ . }} on Twitter">
|
<!--<a href="https://twitter.com/{{ . }}" target="_blank" title="@{{ . }} on Twitter">-->
|
||||||
@{{ . }} on Twitter
|
<!--@{{ . }} on Twitter-->
|
||||||
</a>
|
<!--</a>-->
|
||||||
</li>
|
<!--</li>-->
|
||||||
{{ end }}
|
<!--{{ end }}-->
|
||||||
|
|
||||||
<!--{{ with .Site.Social.github }}-->
|
<!--{{ with .Site.Social.github }}-->
|
||||||
<!--<li>-->
|
<!--<li>-->
|
||||||
|
@ -63,16 +85,17 @@
|
||||||
<!--</li>-->
|
<!--</li>-->
|
||||||
<!--{{ end }}-->
|
<!--{{ end }}-->
|
||||||
|
|
||||||
{{ with .Site.Social.email }}
|
<!--{{ with .Site.Social.email }}-->
|
||||||
<li>
|
<!--<li>-->
|
||||||
<a href="mailto:{{ . }}" title="Email of {{ . }}">
|
<!--<a href="mailto:{{ . }}" title="Email of {{ . }}">-->
|
||||||
Contact via email
|
<!--Contact via email-->
|
||||||
</a>
|
<!--</a>-->
|
||||||
</li>
|
<!--</li>-->
|
||||||
{{ end }}
|
<!--{{ end }}-->
|
||||||
</ul>
|
<!--</ul>-->
|
||||||
{{ end }}
|
<!--{{ end }}-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
<div class="button button-github" role="button" aria-label="GitHub">
|
<div class="button button-github" role="button" aria-label="GitHub">
|
||||||
<a style="padding: 0px; font-size:40px" href="https://github.com/{{ . }}" title="@{{ . }} on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
<a style="padding: 0px; font-size:40px" href="https://github.com/{{ . }}" title="@{{ . }} on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||||
</div>
|
</div>
|
||||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- TODO: disabled until Hugo supports the generation of a content index natively
|
<!-- TODO: disabled until Hugo supports the generation of a content index natively
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
|
@ -108,9 +108,17 @@ font-weight:700;
|
||||||
OVERRIDING THE DEFAULT STYLES - By Mahmoud Zalt (mahmoud@zalt.me) for Laradock.io
|
OVERRIDING THE DEFAULT STYLES - By Mahmoud Zalt (mahmoud@zalt.me) for Laradock.io
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.project .logo img{
|
|
||||||
width: 140px;
|
.project .logo img {
|
||||||
height: 140px;
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-radius: 0%;
|
border-radius: 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.project .banner {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright 2016 <Mahmoud Zalt>
|
Copyright 2018 <Mahmoud Zalt>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
30
README.md
30
README.md
|
@ -1,30 +0,0 @@
|
||||||
![](https://s19.postimg.org/jblfytw9f/laradock-logo.jpg)
|
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/laradock/laradock.svg?branch=master)](https://travis-ci.org/laradock/laradock)
|
|
||||||
|
|
||||||
> Use Docker first and learn about it later.
|
|
||||||
|
|
||||||
A Docker PHP development environment that facilitates running **PHP** Apps on **Docker**.
|
|
||||||
|
|
||||||
[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://zalt.me)
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
[**Full Documentation Here**](http://laradock.io)
|
|
||||||
|
|
||||||
## Credits
|
|
||||||
|
|
||||||
**Maintainers:**
|
|
||||||
|
|
||||||
- [Mahmoud Zalt](https://github.com/Mahmoudz) @mahmoudz | [Twitter](https://twitter.com/Mahmoud_Zalt) | [Site](http://zalt.me)
|
|
||||||
- [Bo-Yi Wu](https://github.com/appleboy) @appleboy | [Twitter](https://twitter.com/appleboy)
|
|
||||||
- [Philippe Trépanier](https://github.com/philtrep) @philtrep
|
|
||||||
- [Mike Erickson](https://github.com/mikeerickson) @mikeerickson
|
|
||||||
- [Dwi Fahni Denni](https://github.com/zeroc0d3) @zeroc0d3
|
|
||||||
- [Thor Erik](https://github.com/thorerik) @thorerik
|
|
||||||
- [Winfried van Loon](https://github.com/winfried-van-loon) @winfried-van-loon
|
|
||||||
- Join Us.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT)
|
|
|
@ -8,5 +8,22 @@ MAINTAINER Patrick Artounian <partounian@gmail.com>
|
||||||
# Add volume for sessions to allow session persistence
|
# Add volume for sessions to allow session persistence
|
||||||
VOLUME /sessions
|
VOLUME /sessions
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_MSSQL=false
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
set -xe \
|
||||||
|
&& apk --update add --no-cache --virtual .phpize-deps $PHPIZE_DEPS unixodbc unixodbc-dev \
|
||||||
|
&& pecl channel-update pecl.php.net \
|
||||||
|
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
|
||||||
|
&& echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
|
||||||
|
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
USER adminer
|
||||||
|
|
||||||
# We expose Adminer on port 8080 (Adminer's default)
|
# We expose Adminer on port 8080 (Adminer's default)
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
|
@ -2,15 +2,19 @@ FROM webdevops/apache:ubuntu-16.04
|
||||||
|
|
||||||
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
||||||
|
|
||||||
ARG PHP_SOCKET=php-fpm:9000
|
ARG PHP_UPSTREAM_CONTAINER=php-fpm
|
||||||
|
ARG PHP_UPSTREAM_PORT=9000
|
||||||
|
ARG PHP_UPSTREAM_TIMEOUT=60
|
||||||
|
|
||||||
ENV WEB_PHP_SOCKET=$PHP_SOCKET
|
ENV WEB_PHP_SOCKET=${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}
|
||||||
|
|
||||||
ENV WEB_DOCUMENT_ROOT=/var/www/public/
|
ENV WEB_DOCUMENT_ROOT=/var/www/
|
||||||
|
|
||||||
|
ENV WEB_PHP_TIMEOUT=${PHP_UPSTREAM_TIMEOUT}
|
||||||
|
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
||||||
WORKDIR /var/www/public/
|
WORKDIR /var/www/
|
||||||
|
|
||||||
COPY vhost.conf /etc/apache2/sites-enabled/vhost.conf
|
COPY vhost.conf /etc/apache2/sites-enabled/vhost.conf
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName laradock.dev
|
ServerName laradock.test
|
||||||
DocumentRoot /var/www/public/
|
DocumentRoot /var/www/
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
|
|
||||||
<Directory "/var/www/public/">
|
<Directory "/var/www/">
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
<IfVersion < 2.4>
|
<IfVersion < 2.4>
|
||||||
Allow from all
|
Allow from all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName sample.dev
|
ServerName sample.test
|
||||||
DocumentRoot /var/www/sample/public/
|
DocumentRoot /var/www/sample/public/
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
./ssh_keys
|
|
@ -0,0 +1,17 @@
|
||||||
|
FROM python:slim
|
||||||
|
|
||||||
|
MAINTAINER melchabcede@gmail.com
|
||||||
|
|
||||||
|
RUN pip install --upgrade --no-cache-dir awsebcli
|
||||||
|
RUN apt-get -yqq update && apt-get -yqq install git-all
|
||||||
|
|
||||||
|
#NOTE: make sure ssh keys are added to ssh_keys folder
|
||||||
|
|
||||||
|
RUN mkdir root/tmp_ssh
|
||||||
|
COPY /ssh_keys/. /root/.ssh/
|
||||||
|
RUN cd /root/.ssh && chmod 600 * && chmod 644 *.pub
|
||||||
|
|
||||||
|
# Set default work directory
|
||||||
|
WORKDIR /var/www
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,46 @@
|
||||||
# Docs: https://caddyserver.com/docs/caddyfile
|
# Docs: https://caddyserver.com/docs/caddyfile
|
||||||
0.0.0.0:80
|
0.0.0.0:80 {
|
||||||
root /var/www/public
|
root /var/www/public
|
||||||
fastcgi / php-fpm:9000 php {
|
fastcgi / php-fpm:9000 php {
|
||||||
index index.php
|
index index.php
|
||||||
|
}
|
||||||
|
|
||||||
|
# To handle .html extensions with laravel change ext to
|
||||||
|
# ext / .html
|
||||||
|
|
||||||
|
rewrite {
|
||||||
|
to {path} {path}/ /index.php?{query}
|
||||||
|
}
|
||||||
|
gzip
|
||||||
|
browse
|
||||||
|
log /var/log/caddy/access.log
|
||||||
|
errors /var/log/caddy/error.log
|
||||||
|
# Uncomment to enable TLS (HTTPS)
|
||||||
|
# Change the first list to listen on port 443 when enabling TLS
|
||||||
|
#tls self_signed
|
||||||
|
|
||||||
|
# To use Lets encrpt tls with a DNS provider uncomment these
|
||||||
|
# lines and change the provider as required
|
||||||
|
#tls {
|
||||||
|
# dns cloudflare
|
||||||
|
#}
|
||||||
}
|
}
|
||||||
|
|
||||||
# To handle .html extensions with laravel change ext to
|
laradock1.demo:80 {
|
||||||
# ext / .html
|
root /var/www/public
|
||||||
|
# Create a Webhook in git.
|
||||||
|
#git {
|
||||||
|
#repo https://github.com/xxx/xxx
|
||||||
|
# path /home/xxx
|
||||||
|
# #interval 60
|
||||||
|
# hook webhook laradock
|
||||||
|
# hook_type generic
|
||||||
|
#}
|
||||||
|
|
||||||
rewrite {
|
|
||||||
r .*
|
|
||||||
ext /
|
|
||||||
to /index.php?{query}
|
|
||||||
}
|
}
|
||||||
gzip
|
|
||||||
browse
|
|
||||||
log /var/log/caddy/access.log
|
|
||||||
errors /var/log/caddy/error.log
|
|
||||||
# Uncomment to enable TLS (HTTPS)
|
|
||||||
# Change the first list to listen on port 443 when enabling TLS
|
|
||||||
#tls self_signed
|
|
||||||
|
|
||||||
# To use Lets encrpt tls with a DNS provider uncomment these
|
laradock2.demo:80 {
|
||||||
# lines and change the provider as required
|
# Create a Proxy and cors.
|
||||||
#tls {
|
#proxy domain.com
|
||||||
# dns cloudflare
|
#cors
|
||||||
#}
|
}
|
||||||
|
|
|
@ -1,21 +1,15 @@
|
||||||
FROM alpine:3.4
|
FROM zuohuadong/caddy:alpine
|
||||||
|
|
||||||
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
|
|
||||||
|
|
||||||
ENV caddy_version=0.10.0
|
MAINTAINER Huadong Zuo <admin@zuohuadong.cn>
|
||||||
|
|
||||||
LABEL caddy_version="$caddy_version" architecture="amd64"
|
ARG plugins="cors"
|
||||||
|
|
||||||
RUN apk update \
|
## ARG plugins="cors cgi cloudflare azure linode"
|
||||||
&& apk upgrade \
|
|
||||||
&& apk add tar curl git
|
|
||||||
|
RUN caddyplug install ${plugins}
|
||||||
|
|
||||||
RUN curl --silent --show-error --fail --location \
|
|
||||||
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
|
|
||||||
"https://caddyserver.com/download/linux/amd64?plugins=http.cgi,http.cors,http.expires,http.filemanager,http.git,http.ipfilter,http.realip,tls.dns.cloudflare,tls.dns.digitalocean,tls.dns.dnspod,tls.dns.dyn,tls.dns.googlecloud,tls.dns.linode,tls.dns.namecheap,tls.dns.ovh,tls.dns.route53,tls.dns.vultr" \
|
|
||||||
| tar --no-same-owner -C /usr/bin/ -xz caddy \
|
|
||||||
&& mv /usr/bin/caddy /usr/bin/caddy \
|
|
||||||
&& chmod 0755 /usr/bin/caddy
|
|
||||||
|
|
||||||
EXPOSE 80 443 2015
|
EXPOSE 80 443 2015
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
version: "2"
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
### Applications Code Container #############################
|
||||||
|
|
||||||
|
applications:
|
||||||
|
volumes:
|
||||||
|
- ${APPLICATION}:/var/www
|
|
@ -0,0 +1,17 @@
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
### Applications Code Container #############################
|
||||||
|
|
||||||
|
applications:
|
||||||
|
image: tianon/true
|
||||||
|
volumes:
|
||||||
|
- applications-sync:/var/www:nocopy # nocopy is required
|
||||||
|
|
||||||
|
### Volumes Setup #############################################
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
applications-sync:
|
||||||
|
external:
|
||||||
|
name: "applications-docker-sync"
|
|
@ -6,8 +6,6 @@ services:
|
||||||
|
|
||||||
applications:
|
applications:
|
||||||
image: tianon/true
|
image: tianon/true
|
||||||
volumes:
|
|
||||||
- ${APPLICATION}:/var/www
|
|
||||||
|
|
||||||
### Workspace Utilities Container ###########################
|
### Workspace Utilities Container ###########################
|
||||||
|
|
||||||
|
@ -18,20 +16,36 @@ services:
|
||||||
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
|
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
|
||||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||||
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
|
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
|
||||||
|
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
|
||||||
|
- INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}
|
||||||
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
|
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
|
||||||
|
- INSTALL_AMQP=${WORKSPACE_INSTALL_AMQP}
|
||||||
|
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
|
||||||
|
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
|
||||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||||
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
||||||
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
|
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
|
||||||
- INSTALL_AEROSPIKE_EXTENSION=${WORKSPACE_INSTALL_AEROSPIKE_EXTENSION}
|
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
|
||||||
- INSTALL_V8JS_EXTENSION=${WORKSPACE_INSTALL_V8JS_EXTENSION}
|
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
|
||||||
|
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
|
||||||
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
||||||
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
|
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
|
||||||
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
|
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
|
||||||
|
- INSTALL_LARAVEL_INSTALLER=${WORKSPACE_INSTALL_LARAVEL_INSTALLER}
|
||||||
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
|
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
|
||||||
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
|
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
|
||||||
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
|
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
|
||||||
|
- INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY}
|
||||||
|
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
|
||||||
|
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
|
||||||
|
- INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
|
||||||
|
- INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}
|
||||||
|
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
|
||||||
|
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
|
||||||
|
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
|
||||||
- PUID=${WORKSPACE_PUID}
|
- PUID=${WORKSPACE_PUID}
|
||||||
- PGID=${WORKSPACE_PGID}
|
- PGID=${WORKSPACE_PGID}
|
||||||
|
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
|
||||||
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
||||||
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
|
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
|
||||||
- TZ=${WORKSPACE_TIMEZONE}
|
- TZ=${WORKSPACE_TIMEZONE}
|
||||||
|
@ -59,17 +73,26 @@ services:
|
||||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||||
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
|
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
|
||||||
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
|
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
|
||||||
|
- INSTALL_AMQP=${PHP_FPM_INSTALL_AMQP}
|
||||||
|
- INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL}
|
||||||
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
|
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
|
||||||
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
||||||
|
- INSTALL_GMP=${PHP_FPM_INSTALL_GMP}
|
||||||
- INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
|
- INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
|
||||||
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
|
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
|
||||||
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
|
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
|
||||||
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
|
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
|
||||||
- INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION}
|
- INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE}
|
||||||
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
|
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
|
||||||
|
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
||||||
|
- INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}
|
||||||
- INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
|
- INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
|
||||||
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
|
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
|
||||||
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
|
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
|
||||||
|
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
|
||||||
|
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
|
||||||
|
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
|
||||||
|
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
|
||||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
|
@ -91,20 +114,26 @@ services:
|
||||||
php-worker:
|
php-worker:
|
||||||
build:
|
build:
|
||||||
context: ./php-worker
|
context: ./php-worker
|
||||||
|
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||||
|
args:
|
||||||
|
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
depends_on:
|
depends_on:
|
||||||
- workspace
|
- workspace
|
||||||
|
extra_hosts:
|
||||||
|
- "dockerhost:${DOCKER_HOST_IP}"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
### Nginx Server Container ##################################
|
### NGINX Server Container ##################################
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
build:
|
build:
|
||||||
context: ./nginx
|
context: ./nginx
|
||||||
args:
|
args:
|
||||||
- PHP_UPSTREAM=php-fpm
|
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
|
||||||
|
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -137,12 +166,14 @@ services:
|
||||||
build:
|
build:
|
||||||
context: ./apache2
|
context: ./apache2
|
||||||
args:
|
args:
|
||||||
- PHP_SOCKET=${PHP_SOCKET}
|
- PHP_UPSTREAM_CONTAINER=${APACHE_PHP_UPSTREAM_CONTAINER}
|
||||||
|
- PHP_UPSTREAM_PORT=${APACHE_PHP_UPSTREAM_PORT}
|
||||||
|
- PHP_UPSTREAM_TIMEOUT=${APACHE_PHP_UPSTREAM_TIMEOUT}
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
volumes:
|
volumes:
|
||||||
- ${APACHE_HOST_LOG_PATH}:/var/log/apache2
|
- ${APACHE_HOST_LOG_PATH}:/var/log/apache2
|
||||||
- ./apache2/sites:/etc/apache2/sites-available
|
- ${APACHE_SITES_PATH}:/etc/apache2/sites-available
|
||||||
ports:
|
ports:
|
||||||
- "${APACHE_HOST_HTTP_PORT}:80"
|
- "${APACHE_HOST_HTTP_PORT}:80"
|
||||||
- "${APACHE_HOST_HTTPS_PORT}:443"
|
- "${APACHE_HOST_HTTPS_PORT}:443"
|
||||||
|
@ -171,7 +202,8 @@ services:
|
||||||
minio:
|
minio:
|
||||||
build: ./minio
|
build: ./minio
|
||||||
volumes:
|
volumes:
|
||||||
- minio:/export
|
- ${DATA_SAVE_PATH}/minio/data:/export
|
||||||
|
- ${DATA_SAVE_PATH}/minio/config:/root/.minio
|
||||||
ports:
|
ports:
|
||||||
- "${MINIO_PORT}:9000"
|
- "${MINIO_PORT}:9000"
|
||||||
environment:
|
environment:
|
||||||
|
@ -179,19 +211,24 @@ services:
|
||||||
- MINIO_SECRET_KEY=secretkey
|
- MINIO_SECRET_KEY=secretkey
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### MySQL Container #########################################
|
### MySQL Container #########################################
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
build:
|
build:
|
||||||
context: ./mysql
|
context: ./mysql
|
||||||
|
args:
|
||||||
|
- MYSQL_VERSION=${MYSQL_VERSION}
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- MYSQL_USER=${MYSQL_USER}
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||||
|
- TZ=${WORKSPACE_TIMEZONE}
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
|
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
|
||||||
|
- ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||||
ports:
|
ports:
|
||||||
- "${MYSQL_PORT}:3306"
|
- "${MYSQL_PORT}:3306"
|
||||||
networks:
|
networks:
|
||||||
|
@ -208,7 +245,8 @@ services:
|
||||||
- MYSQL_PASSWORD=${PERCONA_PASSWORD}
|
- MYSQL_PASSWORD=${PERCONA_PASSWORD}
|
||||||
- MYSQL_ROOT_PASSWORD=${PERCONA_ROOT_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${PERCONA_ROOT_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- percona:/var/lib/mysql
|
- ${DATA_SAVE_PATH}/percona:/var/lib/mysql
|
||||||
|
- ${PERCONA_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||||
ports:
|
ports:
|
||||||
- "${PERCONA_PORT}:3306"
|
- "${PERCONA_PORT}:3306"
|
||||||
networks:
|
networks:
|
||||||
|
@ -236,6 +274,7 @@ services:
|
||||||
build: ./mariadb
|
build: ./mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
|
- ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
|
||||||
|
- ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||||
ports:
|
ports:
|
||||||
- "${MARIADB_PORT}:3306"
|
- "${MARIADB_PORT}:3306"
|
||||||
environment:
|
environment:
|
||||||
|
@ -251,7 +290,7 @@ services:
|
||||||
postgres:
|
postgres:
|
||||||
build: ./postgres
|
build: ./postgres
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/postgres:/var/lib/postgresql/data
|
- ${DATA_SAVE_PATH}/postgres:/var/lib/postgresql
|
||||||
ports:
|
ports:
|
||||||
- "${POSTGRES_PORT}:5432"
|
- "${POSTGRES_PORT}:5432"
|
||||||
environment:
|
environment:
|
||||||
|
@ -295,7 +334,7 @@ services:
|
||||||
mongo:
|
mongo:
|
||||||
build: ./mongo
|
build: ./mongo
|
||||||
ports:
|
ports:
|
||||||
- "27017:27017"
|
- "${MONGODB_PORT}:27017"
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/mongo:/data/db
|
- ${DATA_SAVE_PATH}/mongo:/data/db
|
||||||
networks:
|
networks:
|
||||||
|
@ -306,7 +345,7 @@ services:
|
||||||
rethinkdb:
|
rethinkdb:
|
||||||
build: ./rethinkdb
|
build: ./rethinkdb
|
||||||
ports:
|
ports:
|
||||||
- "8090:8080"
|
- "${RETHINKDB_PORT}:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/rethinkdb:/data/rethinkdb_data
|
- ${DATA_SAVE_PATH}/rethinkdb:/data/rethinkdb_data
|
||||||
networks:
|
networks:
|
||||||
|
@ -319,7 +358,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/redis:/data
|
- ${DATA_SAVE_PATH}/redis:/data
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "${REDIS_PORT}:6379"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
@ -332,10 +371,10 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_SAVE_PATH}/aerospike:/opt/aerospike/data
|
- ${DATA_SAVE_PATH}/aerospike:/opt/aerospike/data
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "${AEROSPIKE_SERVICE_PORT}:3000"
|
||||||
- "3001:3001"
|
- "${AEROSPIKE_FABRIC_PORT}:3001"
|
||||||
- "3002:3002"
|
- "${AEROSPIKE_HEARTBEAT_PORT}:3002"
|
||||||
- "3003:3003"
|
- "${AEROSPIKE_INFO_PORT}:3003"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
@ -396,16 +435,15 @@ services:
|
||||||
|
|
||||||
caddy:
|
caddy:
|
||||||
build: ./caddy
|
build: ./caddy
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
- "2015:2015"
|
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- applications
|
- applications
|
||||||
volumes:
|
volumes:
|
||||||
- ./caddy/Caddyfile:/etc/Caddyfile
|
- ${CADDY_CUSTOM_CADDYFILE}:/etc/Caddyfile
|
||||||
- ./logs/caddy:/var/log/caddy
|
- ${CADDY_HOST_LOG_PATH}:/var/log/caddy
|
||||||
- caddy:/root/.caddy
|
- ${DATA_SAVE_PATH}:/root/.caddy
|
||||||
|
ports:
|
||||||
|
- "${CADDY_HOST_HTTP_PORT}:80"
|
||||||
|
- "${CADDY_HOST_HTTPS_PORT}:443"
|
||||||
depends_on:
|
depends_on:
|
||||||
- php-fpm
|
- php-fpm
|
||||||
networks:
|
networks:
|
||||||
|
@ -432,7 +470,10 @@ services:
|
||||||
### Adminer Container ####################################
|
### Adminer Container ####################################
|
||||||
|
|
||||||
adminer:
|
adminer:
|
||||||
build: ./adminer
|
build:
|
||||||
|
context: ./adminer
|
||||||
|
args:
|
||||||
|
- INSTALL_MSSQL=${ADM_INSTALL_MSSQL}
|
||||||
ports:
|
ports:
|
||||||
- "${ADM_PORT}:8080"
|
- "${ADM_PORT}:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -447,12 +488,15 @@ services:
|
||||||
build: ./pgadmin
|
build: ./pgadmin
|
||||||
ports:
|
ports:
|
||||||
- "5050:5050"
|
- "5050:5050"
|
||||||
|
volumes:
|
||||||
|
- ${DATA_SAVE_PATH}/pgadmin-backup:/var/lib/pgadmin/storage/pgadmin4
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
|
||||||
### ElasticSearch Container #################################
|
### ElasticSearch Container #################################
|
||||||
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
|
@ -460,6 +504,15 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- elasticsearch-data:/usr/share/elasticsearch/data
|
- elasticsearch-data:/usr/share/elasticsearch/data
|
||||||
- elasticsearch-plugins:/usr/share/elasticsearch/plugins
|
- elasticsearch-plugins:/usr/share/elasticsearch/plugins
|
||||||
|
environment:
|
||||||
|
- cluster.name=laradock-cluster
|
||||||
|
- bootstrap.memory_lock=true
|
||||||
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||||
|
ulimits:
|
||||||
|
memlock:
|
||||||
|
soft: -1
|
||||||
|
hard: -1
|
||||||
|
mem_limit: 1024m
|
||||||
ports:
|
ports:
|
||||||
- "${ELASTICSEARCH_HOST_HTTP_PORT}:9200"
|
- "${ELASTICSEARCH_HOST_HTTP_PORT}:9200"
|
||||||
- "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
|
- "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
|
||||||
|
@ -469,6 +522,19 @@ services:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
|
||||||
|
### Kibana Container #######################################
|
||||||
|
|
||||||
|
kibana:
|
||||||
|
build: ./kibana
|
||||||
|
ports:
|
||||||
|
- "${KIBANA_HTTP_PORT}:5601"
|
||||||
|
depends_on:
|
||||||
|
- elasticsearch
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### Certbot Container ##################################
|
### Certbot Container ##################################
|
||||||
|
|
||||||
certbot:
|
certbot:
|
||||||
|
@ -492,6 +558,18 @@ services:
|
||||||
- "8025:8025"
|
- "8025:8025"
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
|
### MailDev Container #######################################
|
||||||
|
|
||||||
|
maildev:
|
||||||
|
build: ./maildev
|
||||||
|
ports:
|
||||||
|
- "${MAILDEV_HTTP_PORT}:80"
|
||||||
|
- "${MAILDEV_SMTP_PORT}:25"
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
### Selenium Container ########################################
|
### Selenium Container ########################################
|
||||||
|
|
||||||
|
@ -542,9 +620,9 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
|
|
||||||
### Balancer Haproxy ##########################################
|
### HAProxy Load Balancer ####################################
|
||||||
|
|
||||||
balancer:
|
haproxy:
|
||||||
build: ./haproxy
|
build: ./haproxy
|
||||||
ports:
|
ports:
|
||||||
- "${HAPROXY_HOST_HTTP_PORT}:8085"
|
- "${HAPROXY_HOST_HTTP_PORT}:8085"
|
||||||
|
@ -555,6 +633,7 @@ services:
|
||||||
- proxy2
|
- proxy2
|
||||||
|
|
||||||
### Jenkins ###################################################
|
### Jenkins ###################################################
|
||||||
|
|
||||||
jenkins:
|
jenkins:
|
||||||
build: ./jenkins
|
build: ./jenkins
|
||||||
environment:
|
environment:
|
||||||
|
@ -566,6 +645,45 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ${JENKINS_HOME}:/var/jenkins_home
|
- ${JENKINS_HOME}:/var/jenkins_home
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
|
### Grafana Container #########################################
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
build:
|
||||||
|
context: ./grafana
|
||||||
|
volumes:
|
||||||
|
- ${DATA_SAVE_PATH}/grafana:/var/lib/grafana
|
||||||
|
ports:
|
||||||
|
- "${GRAFANA_PORT}:3000"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
|
### Laravel Echo Server #######################################
|
||||||
|
laravel-echo-server:
|
||||||
|
build:
|
||||||
|
context: ./laravel-echo-server
|
||||||
|
volumes:
|
||||||
|
- ./laravel-echo-server/laravel-echo-server.json:/app/laravel-echo-server.json:ro
|
||||||
|
ports:
|
||||||
|
- "${LARAVEL_ECHO_SERVER_PORT}:6001"
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
|
### AWS EB-CLI ####
|
||||||
|
aws:
|
||||||
|
build:
|
||||||
|
context: ./aws
|
||||||
|
volumes_from:
|
||||||
|
- applications
|
||||||
|
depends_on:
|
||||||
|
- workspace
|
||||||
|
tty: true
|
||||||
|
|
||||||
### Networks Setup ############################################
|
### Networks Setup ############################################
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
version: "2"
|
||||||
|
|
||||||
|
options:
|
||||||
|
verbose: false
|
||||||
|
syncs:
|
||||||
|
applications-docker-sync: # name of the intermediary sync volume
|
||||||
|
compose-dev-file-path: 'docker-compose.sync.yml' # docker-compose override file
|
||||||
|
|
||||||
|
src: '${APPLICATION}' # host source directory
|
||||||
|
sync_userid: 1000 # giving permissions to www-data user (as defined in nginx and php-fpm Dockerfiles)
|
||||||
|
sync_strategy: '${DOCKER_SYNC_STRATEGY}' # for osx use 'native_osx', for windows use 'unison'
|
||||||
|
|
||||||
|
sync_excludes: ['laradock', 'ignored_folder_example'] # ignored directories
|
|
@ -1,5 +1,3 @@
|
||||||
FROM elasticsearch:latest
|
FROM docker.elastic.co/elasticsearch/elasticsearch:5.4.1
|
||||||
|
|
||||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
|
||||||
|
|
||||||
EXPOSE 9200 9300
|
EXPOSE 9200 9300
|
||||||
|
|
161
env-example
161
env-example
|
@ -1,50 +1,95 @@
|
||||||
############################
|
###########################################################
|
||||||
# General Setup
|
# General Setup
|
||||||
############################
|
###########################################################
|
||||||
|
|
||||||
### Application Path
|
### Application Path ###################################################################################################
|
||||||
# Point to your application code, will be available at `/var/www`.
|
# Point to your code, will be available at `/var/www`.
|
||||||
|
|
||||||
APPLICATION=../
|
APPLICATION=../
|
||||||
|
|
||||||
### Data Path:
|
### PHP Version ########################################################################################################
|
||||||
# For all storage systems.
|
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 71 - 70 - 56
|
||||||
|
|
||||||
DATA_SAVE_PATH=/tmp
|
|
||||||
|
|
||||||
### PHP version
|
|
||||||
# Applies to the Workspace and PHP-FPM containers (Does not apply to HHVM)
|
|
||||||
# Accepted values: 71 - 70 - 56
|
|
||||||
|
|
||||||
PHP_VERSION=71
|
PHP_VERSION=71
|
||||||
|
|
||||||
### PHP interpreter
|
### PHP Interpreter ####################################################################################################
|
||||||
# Accepted values: hhvm - php-fpm
|
# Select the PHP Interpreter. Accepted values: hhvm - php-fpm
|
||||||
|
|
||||||
PHP_INTERPRETER=php-fpm
|
PHP_INTERPRETER=php-fpm
|
||||||
|
|
||||||
############################
|
### Data Path ##########################################################################################################
|
||||||
|
# Choose storage path on your machine. For all storage systems.
|
||||||
|
|
||||||
|
DATA_SAVE_PATH=~/.laradock/data
|
||||||
|
|
||||||
|
### Docker compose files ###############################################################################################
|
||||||
|
# Select which docker-compose files to include.
|
||||||
|
# If using docker-sync. Set the value to: docker-compose.yml:docker-compose.dev.yml:docker-compose.sync.yml
|
||||||
|
# Change the separator from : to ; on Windows
|
||||||
|
|
||||||
|
COMPOSE_PATH_SEPARATOR=:
|
||||||
|
COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml
|
||||||
|
|
||||||
|
### Docker Host IP #####################################################################################################
|
||||||
|
# Enter your Docker Host IP (will be appended to /etc/hosts). Default is `10.0.75.1`
|
||||||
|
|
||||||
|
DOCKER_HOST_IP=10.0.75.1
|
||||||
|
|
||||||
|
### Remote Interpreter #################################################################################################
|
||||||
|
# Choose a Remote Interpreter entry matching name. Default is `laradock`
|
||||||
|
|
||||||
|
PHP_IDE_CONFIG=serverName=laradock
|
||||||
|
|
||||||
|
### Windows Path #######################################################################################################
|
||||||
|
# A fix for Windows users, to ensure the application path works.
|
||||||
|
|
||||||
|
COMPOSE_CONVERT_WINDOWS_PATHS=1
|
||||||
|
|
||||||
|
### Environment ########################################################################################################
|
||||||
|
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
|
||||||
|
|
||||||
|
CHANGE_SOURCE=false
|
||||||
|
|
||||||
|
########################################################################################################################
|
||||||
|
|
||||||
|
###########################################################
|
||||||
# Containers Customization
|
# Containers Customization
|
||||||
############################
|
###########################################################
|
||||||
|
|
||||||
### WORKSPACE ##########################################################################################################
|
### WORKSPACE ##########################################################################################################
|
||||||
|
|
||||||
WORKSPACE_INSTALL_XDEBUG=false
|
WORKSPACE_INSTALL_XDEBUG=false
|
||||||
|
WORKSPACE_INSTALL_LDAP=false
|
||||||
WORKSPACE_INSTALL_SOAP=false
|
WORKSPACE_INSTALL_SOAP=false
|
||||||
|
WORKSPACE_INSTALL_IMAP=false
|
||||||
WORKSPACE_INSTALL_MONGO=false
|
WORKSPACE_INSTALL_MONGO=false
|
||||||
|
WORKSPACE_INSTALL_AMQP=false
|
||||||
|
WORKSPACE_INSTALL_PHPREDIS=false
|
||||||
|
WORKSPACE_INSTALL_MSSQL=false
|
||||||
WORKSPACE_INSTALL_NODE=false
|
WORKSPACE_INSTALL_NODE=false
|
||||||
WORKSPACE_INSTALL_YARN=false
|
WORKSPACE_INSTALL_YARN=false
|
||||||
WORKSPACE_INSTALL_DRUSH=false
|
WORKSPACE_INSTALL_DRUSH=false
|
||||||
WORKSPACE_INSTALL_AEROSPIKE_EXTENSION=false
|
WORKSPACE_INSTALL_DRUPAL_CONSOLE=false
|
||||||
WORKSPACE_INSTALL_V8JS_EXTENSION=false
|
WORKSPACE_INSTALL_AEROSPIKE=false
|
||||||
|
WORKSPACE_INSTALL_V8JS=false
|
||||||
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
|
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
|
||||||
WORKSPACE_INSTALL_WORKSPACE_SSH=false
|
WORKSPACE_INSTALL_WORKSPACE_SSH=false
|
||||||
WORKSPACE_INSTALL_LARAVEL_ENVOY=false
|
WORKSPACE_INSTALL_LARAVEL_ENVOY=false
|
||||||
|
WORKSPACE_INSTALL_LARAVEL_INSTALLER=false
|
||||||
WORKSPACE_INSTALL_DEPLOYER=false
|
WORKSPACE_INSTALL_DEPLOYER=false
|
||||||
WORKSPACE_INSTALL_LINUXBREW=false
|
WORKSPACE_INSTALL_LINUXBREW=false
|
||||||
WORKSPACE_INSTALL_MC=false
|
WORKSPACE_INSTALL_MC=false
|
||||||
|
WORKSPACE_INSTALL_SYMFONY=false
|
||||||
|
WORKSPACE_INSTALL_PYTHON=false
|
||||||
|
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
WORKSPACE_INSTALL_IMAGEMAGICK=false
|
||||||
|
WORKSPACE_INSTALL_TERRAFORM=false
|
||||||
|
WORKSPACE_INSTALL_DUSK_DEPS=false
|
||||||
|
WORKSPACE_INSTALL_PG_CLIENT=false
|
||||||
|
WORKSPACE_INSTALL_SWOOLE=false
|
||||||
WORKSPACE_PUID=1000
|
WORKSPACE_PUID=1000
|
||||||
WORKSPACE_PGID=1000
|
WORKSPACE_PGID=1000
|
||||||
|
WORKSPACE_CHROME_DRIVER_VERSION=2.32
|
||||||
WORKSPACE_NODE_VERSION=stable
|
WORKSPACE_NODE_VERSION=stable
|
||||||
WORKSPACE_YARN_VERSION=latest
|
WORKSPACE_YARN_VERSION=latest
|
||||||
WORKSPACE_TIMEZONE=UTC
|
WORKSPACE_TIMEZONE=UTC
|
||||||
|
@ -54,18 +99,31 @@ WORKSPACE_SSH_PORT=2222
|
||||||
|
|
||||||
PHP_FPM_INSTALL_XDEBUG=false
|
PHP_FPM_INSTALL_XDEBUG=false
|
||||||
PHP_FPM_INSTALL_MONGO=false
|
PHP_FPM_INSTALL_MONGO=false
|
||||||
|
PHP_FPM_INSTALL_AMQP=false
|
||||||
|
PHP_FPM_INSTALL_MSSQL=false
|
||||||
PHP_FPM_INSTALL_SOAP=false
|
PHP_FPM_INSTALL_SOAP=false
|
||||||
PHP_FPM_INSTALL_ZIP_ARCHIVE=false
|
PHP_FPM_INSTALL_ZIP_ARCHIVE=false
|
||||||
PHP_FPM_INSTALL_BCMATH=false
|
PHP_FPM_INSTALL_BCMATH=false
|
||||||
|
PHP_FPM_INSTALL_GMP=false
|
||||||
PHP_FPM_INSTALL_PHPREDIS=false
|
PHP_FPM_INSTALL_PHPREDIS=false
|
||||||
PHP_FPM_INSTALL_MEMCACHED=false
|
PHP_FPM_INSTALL_MEMCACHED=false
|
||||||
PHP_FPM_INSTALL_OPCACHE=false
|
PHP_FPM_INSTALL_OPCACHE=false
|
||||||
PHP_FPM_INSTALL_EXIF=false
|
PHP_FPM_INSTALL_EXIF=false
|
||||||
PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false
|
PHP_FPM_INSTALL_AEROSPIKE=false
|
||||||
PHP_FPM_INSTALL_MYSQLI=false
|
PHP_FPM_INSTALL_MYSQLI=false
|
||||||
|
PHP_FPM_INSTALL_PGSQL=false
|
||||||
PHP_FPM_INSTALL_TOKENIZER=false
|
PHP_FPM_INSTALL_TOKENIZER=false
|
||||||
PHP_FPM_INSTALL_INTL=false
|
PHP_FPM_INSTALL_INTL=false
|
||||||
PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
||||||
|
PHP_FPM_INSTALL_LDAP=false
|
||||||
|
PHP_FPM_INSTALL_SWOOLE=false
|
||||||
|
PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
PHP_FPM_INSTALL_IMAGEMAGICK=false
|
||||||
|
PHP_FPM_INSTALL_PG_CLIENT=false
|
||||||
|
|
||||||
|
### PHP_WORKER #########################################################################################################
|
||||||
|
|
||||||
|
PHP_WORKER_INSTALL_PGSQL=false
|
||||||
|
|
||||||
### NGINX ##############################################################################################################
|
### NGINX ##############################################################################################################
|
||||||
|
|
||||||
|
@ -73,22 +131,32 @@ NGINX_HOST_HTTP_PORT=80
|
||||||
NGINX_HOST_HTTPS_PORT=443
|
NGINX_HOST_HTTPS_PORT=443
|
||||||
NGINX_HOST_LOG_PATH=./logs/nginx/
|
NGINX_HOST_LOG_PATH=./logs/nginx/
|
||||||
NGINX_SITES_PATH=./nginx/sites/
|
NGINX_SITES_PATH=./nginx/sites/
|
||||||
|
NGINX_PHP_UPSTREAM_CONTAINER=php-fpm
|
||||||
|
NGINX_PHP_UPSTREAM_PORT=9000
|
||||||
|
|
||||||
### APACHE #############################################################################################################
|
### APACHE #############################################################################################################
|
||||||
|
|
||||||
APACHE_HOST_HTTP_PORT=80
|
APACHE_HOST_HTTP_PORT=80
|
||||||
APACHE_HOST_HTTPS_PORT=443
|
APACHE_HOST_HTTPS_PORT=443
|
||||||
APACHE2_PHP_SOCKET=php-fpm:9000
|
|
||||||
APACHE_HOST_LOG_PATH=./logs/apache2
|
APACHE_HOST_LOG_PATH=./logs/apache2
|
||||||
PHP_SOCKET=php-fpm:9000
|
APACHE_SITES_PATH=./apache2/sites
|
||||||
|
APACHE_PHP_UPSTREAM_CONTAINER=php-fpm
|
||||||
|
APACHE_PHP_UPSTREAM_PORT=9000
|
||||||
|
APACHE_PHP_UPSTREAM_TIMEOUT=60
|
||||||
|
|
||||||
### MYSQL ##############################################################################################################
|
### MYSQL ##############################################################################################################
|
||||||
|
|
||||||
|
MYSQL_VERSION=8.0
|
||||||
MYSQL_DATABASE=default
|
MYSQL_DATABASE=default
|
||||||
MYSQL_USER=default
|
MYSQL_USER=default
|
||||||
MYSQL_PASSWORD=secret
|
MYSQL_PASSWORD=secret
|
||||||
MYSQL_PORT=3306
|
MYSQL_PORT=3306
|
||||||
MYSQL_ROOT_PASSWORD=root
|
MYSQL_ROOT_PASSWORD=root
|
||||||
|
MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d
|
||||||
|
|
||||||
|
### REDIS ##############################################################################################################
|
||||||
|
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
### Percona ############################################################################################################
|
### Percona ############################################################################################################
|
||||||
|
|
||||||
|
@ -97,6 +165,7 @@ PERCONA_USER=homestead
|
||||||
PERCONA_PASSWORD=secret
|
PERCONA_PASSWORD=secret
|
||||||
PERCONA_PORT=3306
|
PERCONA_PORT=3306
|
||||||
PERCONA_ROOT_PASSWORD=root
|
PERCONA_ROOT_PASSWORD=root
|
||||||
|
PERCONA_ENTRYPOINT_INITDB=./percona/docker-entrypoint-initdb.d
|
||||||
|
|
||||||
### MSSQL ##############################################################################################################
|
### MSSQL ##############################################################################################################
|
||||||
|
|
||||||
|
@ -111,6 +180,7 @@ MARIADB_USER=default
|
||||||
MARIADB_PASSWORD=secret
|
MARIADB_PASSWORD=secret
|
||||||
MARIADB_PORT=3306
|
MARIADB_PORT=3306
|
||||||
MARIADB_ROOT_PASSWORD=root
|
MARIADB_ROOT_PASSWORD=root
|
||||||
|
MARIADB_ENTRYPOINT_INITDB=./mariadb/docker-entrypoint-initdb.d
|
||||||
|
|
||||||
### POSTGRES ###########################################################################################################
|
### POSTGRES ###########################################################################################################
|
||||||
|
|
||||||
|
@ -132,6 +202,10 @@ RABBITMQ_DEFAULT_PASS=guest
|
||||||
ELASTICSEARCH_HOST_HTTP_PORT=9200
|
ELASTICSEARCH_HOST_HTTP_PORT=9200
|
||||||
ELASTICSEARCH_HOST_TRANSPORT_PORT=9300
|
ELASTICSEARCH_HOST_TRANSPORT_PORT=9300
|
||||||
|
|
||||||
|
### KIBANA #############################################################################################################
|
||||||
|
|
||||||
|
KIBANA_HTTP_PORT=5601
|
||||||
|
|
||||||
### MEMCACHED ##########################################################################################################
|
### MEMCACHED ##########################################################################################################
|
||||||
|
|
||||||
MEMCACHED_HOST_PORT=11211
|
MEMCACHED_HOST_PORT=11211
|
||||||
|
@ -157,6 +231,7 @@ MINIO_PORT=9000
|
||||||
### ADMINER ############################################################################################################
|
### ADMINER ############################################################################################################
|
||||||
|
|
||||||
ADM_PORT=8080
|
ADM_PORT=8080
|
||||||
|
ADM_INSTALL_MSSQL=false
|
||||||
|
|
||||||
### PHP MY ADMIN #######################################################################################################
|
### PHP MY ADMIN #######################################################################################################
|
||||||
|
|
||||||
|
@ -171,6 +246,11 @@ PMA_PASSWORD=secret
|
||||||
PMA_ROOT_PASSWORD=secret
|
PMA_ROOT_PASSWORD=secret
|
||||||
PMA_PORT=8080
|
PMA_PORT=8080
|
||||||
|
|
||||||
|
### MAILDEV ############################################################################################################
|
||||||
|
|
||||||
|
MAILDEV_HTTP_PORT=1080
|
||||||
|
MAILDEV_SMTP_PORT=25
|
||||||
|
|
||||||
### VARNISH ############################################################################################################
|
### VARNISH ############################################################################################################
|
||||||
|
|
||||||
VARNISH_CONFIG=/etc/varnish/default.vcl
|
VARNISH_CONFIG=/etc/varnish/default.vcl
|
||||||
|
@ -202,6 +282,10 @@ JENKINS_HOST_HTTP_PORT=8090
|
||||||
JENKINS_HOST_SLAVE_AGENT_PORT=50000
|
JENKINS_HOST_SLAVE_AGENT_PORT=50000
|
||||||
JENKINS_HOME=./jenkins/jenkins_home
|
JENKINS_HOME=./jenkins/jenkins_home
|
||||||
|
|
||||||
|
### GRAFANA ############################################################################################################
|
||||||
|
|
||||||
|
GRAFANA_PORT=3000
|
||||||
|
|
||||||
### BLACKFIRE ##########################################################################################################
|
### BLACKFIRE ##########################################################################################################
|
||||||
|
|
||||||
# Create an account on blackfire.io. Don't enable blackfire and xDebug at the same time.
|
# Create an account on blackfire.io. Don't enable blackfire and xDebug at the same time.
|
||||||
|
@ -213,29 +297,38 @@ BLACKFIRE_CLIENT_TOKEN=<client_token>
|
||||||
BLACKFIRE_SERVER_ID=<server_id>
|
BLACKFIRE_SERVER_ID=<server_id>
|
||||||
BLACKFIRE_SERVER_TOKEN=<server_token>
|
BLACKFIRE_SERVER_TOKEN=<server_token>
|
||||||
|
|
||||||
|
### AEROSPIKE ##########################################################################################################
|
||||||
|
|
||||||
##### TO BE CONTINUE .................................
|
AEROSPIKE_SERVICE_PORT=3000
|
||||||
|
AEROSPIKE_FABRIC_PORT=3001
|
||||||
|
AEROSPIKE_HEARTBEAT_PORT=3002
|
||||||
|
AEROSPIKE_INFO_PORT=3003
|
||||||
|
|
||||||
# ......... Missing: neo4j mongo rethinkdb redis aerospike pgadmin...
|
### RETHINKDB ##########################################################################################################
|
||||||
# .........
|
|
||||||
# .........
|
|
||||||
|
|
||||||
|
RETHINKDB_PORT=8090
|
||||||
|
|
||||||
|
### MONGODB ############################################################################################################
|
||||||
|
|
||||||
############################
|
MONGODB_PORT=27017
|
||||||
# Miscellaneous
|
|
||||||
############################
|
|
||||||
|
|
||||||
# Replace with your Docker Host IP (will be appended to /etc/hosts)
|
### CADDY ##############################################################################################################
|
||||||
|
|
||||||
DOCKER_HOST_IP=10.0.75.1
|
CADDY_HOST_HTTP_PORT=80
|
||||||
|
CADDY_HOST_HTTPS_PORT=443
|
||||||
|
CADDY_HOST_LOG_PATH=./logs/caddy
|
||||||
|
CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
|
||||||
|
|
||||||
|
### LARAVEL ECHO SERVER ################################################################################################
|
||||||
|
|
||||||
# The Remote Interpreter entry matching name `laradock`
|
LARAVEL_ECHO_SERVER_PORT=6001
|
||||||
|
|
||||||
PHP_IDE_CONFIG=serverName=laradock
|
### DOCKER-SYNC ################################################################################################
|
||||||
|
|
||||||
|
# osx: 'native_osx' (default)
|
||||||
|
# windows: 'unison'
|
||||||
|
# linux: docker-sync not required
|
||||||
|
|
||||||
# Fix for windows users to make sure the application path works.
|
DOCKER_SYNC_STRATEGY=native_osx
|
||||||
|
|
||||||
COMPOSE_CONVERT_WINDOWS_PATHS=1
|
########################################################################################################################
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM grafana/grafana:latest
|
||||||
|
|
||||||
|
EXPOSE 3000
|
|
@ -5,7 +5,8 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
|
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
|
||||||
|
|
||||||
RUN apt-get update -y \
|
RUN apt-get update -y \
|
||||||
&& apt-get install -y software-properties-common \
|
&& apt-get install -y software-properties-common wget \
|
||||||
|
&& wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add - \
|
||||||
&& add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main" \
|
&& add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main" \
|
||||||
&& apt-get update -y \
|
&& apt-get update -y \
|
||||||
&& apt-get install -y hhvm \
|
&& apt-get install -y hhvm \
|
||||||
|
|
|
@ -25,8 +25,8 @@ VOLUME /var/jenkins_home
|
||||||
# or config file with your custom jenkins Docker image.
|
# or config file with your custom jenkins Docker image.
|
||||||
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
|
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
|
||||||
|
|
||||||
ENV TINI_VERSION 0.13.2
|
ENV TINI_VERSION 0.16.1
|
||||||
ENV TINI_SHA afbf8de8a63ce8e4f18cb3f34dfdbbd354af68a1
|
ENV TINI_SHA d1cb5d71adc01d47e302ea439d70c79bd0864288
|
||||||
|
|
||||||
# Use tini as subreaper in Docker container to adopt zombie processes
|
# Use tini as subreaper in Docker container to adopt zombie processes
|
||||||
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
|
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
|
||||||
|
@ -36,10 +36,12 @@ COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groov
|
||||||
|
|
||||||
# jenkins version being bundled in this docker image
|
# jenkins version being bundled in this docker image
|
||||||
ARG JENKINS_VERSION
|
ARG JENKINS_VERSION
|
||||||
ENV JENKINS_VERSION ${JENKINS_VERSION:-2.32.3}
|
ENV JENKINS_VERSION ${JENKINS_VERSION:-2.89.2}
|
||||||
|
|
||||||
# jenkins.war checksum, download will be validated using it
|
# jenkins.war checksum, download will be validated using it
|
||||||
ARG JENKINS_SHA=a25b9a314ca9e76f9673da7309e1882e32674223
|
# 2.89.2
|
||||||
|
ARG JENKINS_SHA=014f669f32bc6e925e926e260503670b32662f006799b133a031a70a794c8a14
|
||||||
|
|
||||||
|
|
||||||
# Can be used to customize where jenkins.war get downloaded from
|
# Can be used to customize where jenkins.war get downloaded from
|
||||||
ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war
|
ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war
|
||||||
|
@ -47,7 +49,7 @@ ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-w
|
||||||
# could use ADD but this one does not check Last-Modified header neither does it allow to control checksum
|
# could use ADD but this one does not check Last-Modified header neither does it allow to control checksum
|
||||||
# see https://github.com/docker/docker/issues/8331
|
# see https://github.com/docker/docker/issues/8331
|
||||||
RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
|
RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
|
||||||
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha1sum -c -
|
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha256sum -c -
|
||||||
|
|
||||||
ENV JENKINS_UC https://updates.jenkins.io
|
ENV JENKINS_UC https://updates.jenkins.io
|
||||||
RUN chown -R ${user} "$JENKINS_HOME" /usr/share/jenkins/ref
|
RUN chown -R ${user} "$JENKINS_HOME" /usr/share/jenkins/ref
|
||||||
|
@ -71,7 +73,7 @@ RUN apt-get install -y curl && curl -sSL https://get.docker.com/ | sh
|
||||||
RUN usermod -aG docker jenkins
|
RUN usermod -aG docker jenkins
|
||||||
|
|
||||||
# Install Docker-Compose
|
# Install Docker-Compose
|
||||||
RUN curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
RUN curl -L "https://github.com/docker/compose/releases/download/1.16.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||||
RUN chmod +x /usr/local/bin/docker-compose
|
RUN chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM docker.elastic.co/kibana/kibana:5.4.1
|
||||||
|
|
||||||
|
EXPOSE 5601
|
|
@ -0,0 +1,22 @@
|
||||||
|
FROM node:alpine
|
||||||
|
|
||||||
|
# Create app directory
|
||||||
|
RUN mkdir -p /usr/src/app
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Install app dependencies
|
||||||
|
COPY package.json /usr/src/app/
|
||||||
|
|
||||||
|
RUN apk add --update \
|
||||||
|
python \
|
||||||
|
python-dev \
|
||||||
|
py-pip \
|
||||||
|
build-base
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Bundle app source
|
||||||
|
COPY laravel-echo-server.json /usr/src/app/laravel-echo-server.json
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD [ "npm", "start" ]
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"authHost": "localhost",
|
||||||
|
"authEndpoint": "/broadcasting/auth",
|
||||||
|
"clients": [],
|
||||||
|
"database": "redis",
|
||||||
|
"databaseConfig": {
|
||||||
|
"redis": {
|
||||||
|
"port": "6379",
|
||||||
|
"host": "redis"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"devMode": true,
|
||||||
|
"host": null,
|
||||||
|
"port": "6001",
|
||||||
|
"protocol": "http",
|
||||||
|
"socketio": {},
|
||||||
|
"sslCertPath": "",
|
||||||
|
"sslKeyPath": ""
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"name": "laravel-echo-server-docker",
|
||||||
|
"description": "Docker container for running laravel-echo-server",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"laravel-echo-server": "^1.2.8"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "laravel-echo-server start"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
FROM djfarrelly/maildev
|
||||||
|
|
||||||
|
MAINTAINER Maxime Hélias <maximehelias16@gmail.com>
|
||||||
|
|
||||||
|
EXPOSE 80 25
|
|
@ -0,0 +1 @@
|
||||||
|
*.sql
|
|
@ -0,0 +1,28 @@
|
||||||
|
###
|
||||||
|
### Copy createdb.sql.example to createdb.sql
|
||||||
|
### then uncomment then set database name and username to create you need databases
|
||||||
|
#
|
||||||
|
# example: .env MYSQL_USER=appuser and need db name is myshop_db
|
||||||
|
#
|
||||||
|
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
|
||||||
|
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
|
||||||
|
#
|
||||||
|
###
|
||||||
|
### this sql script is auto run when mariadb container start and $DATA_SAVE_PATH/mariadb not exists.
|
||||||
|
###
|
||||||
|
### if your $DATA_SAVE_PATH/mariadb is exists and you do not want to delete it, you can run by manual execution:
|
||||||
|
###
|
||||||
|
### docker-compose exec mariadb bash
|
||||||
|
### mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
|
||||||
|
###
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ;
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_2` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_2`.* TO 'default'@'%' ;
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_3` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_3`.* TO 'default'@'%' ;
|
||||||
|
|
||||||
|
FLUSH PRIVILEGES ;
|
|
@ -1,5 +1,5 @@
|
||||||
#wait for the SQL Server to come up
|
#wait for the SQL Server to come up
|
||||||
sleep 45s
|
sleep 45
|
||||||
|
|
||||||
#run the setup script to create the DB and the schema in the DB
|
#run the setup script to create the DB and the schema in the DB
|
||||||
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql
|
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql
|
|
@ -1,2 +1,2 @@
|
||||||
#start SQL Server, start the script to create the DB and import the data, start the app
|
#start SQL Server, start the script to create the DB and import the data, start the app
|
||||||
/opt/mssql/bin/sqlservr.sh & /usr/src/app/create_table.sh & tail -f /dev/null
|
/opt/mssql/bin/sqlservr & /usr/src/app/create_table.sh & tail -f /dev/null
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
FROM mysql:5.7
|
ARG MYSQL_VERSION=8.0
|
||||||
|
FROM mysql:${MYSQL_VERSION}
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Set Timezone
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG TZ=UTC
|
||||||
|
ENV TZ ${TZ}
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
RUN chown -R mysql:root /var/lib/mysql/
|
RUN chown -R mysql:root /var/lib/mysql/
|
||||||
|
|
||||||
ADD my.cnf /etc/mysql/conf.d/my.cnf
|
ADD my.cnf /etc/mysql/conf.d/my.cnf
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
*.sql
|
|
@ -0,0 +1,28 @@
|
||||||
|
#
|
||||||
|
# Copy createdb.sql.example to createdb.sql
|
||||||
|
# then uncomment then set database name and username to create you need databases
|
||||||
|
#
|
||||||
|
# example: .env MYSQL_USER=appuser and need db name is myshop_db
|
||||||
|
#
|
||||||
|
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
|
||||||
|
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# this sql script will auto run when the mysql container starts and the $DATA_SAVE_PATH/mysql not found.
|
||||||
|
#
|
||||||
|
# if your $DATA_SAVE_PATH/mysql exists and you do not want to delete it, you can run by manual execution:
|
||||||
|
#
|
||||||
|
# docker-compose exec mysql bash
|
||||||
|
# mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
|
||||||
|
#
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ;
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_2` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_2`.* TO 'default'@'%' ;
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_3` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_3`.* TO 'default'@'%' ;
|
||||||
|
|
||||||
|
FLUSH PRIVILEGES ;
|
|
@ -7,3 +7,4 @@
|
||||||
|
|
||||||
[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_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|
||||||
|
character-set-server=utf8
|
||||||
|
|
|
@ -4,17 +4,25 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
ADD nginx.conf /etc/nginx/
|
ADD nginx.conf /etc/nginx/
|
||||||
|
|
||||||
ARG PHP_UPSTREAM=php-fpm
|
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
|
||||||
|
|
||||||
# fix a problem--#397, change application source from dl-cdn.alpinelinux.org to aliyun source.
|
ARG CHANGE_SOURCE=false
|
||||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories
|
RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
||||||
|
# Change application source from dl-cdn.alpinelinux.org to aliyun source
|
||||||
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
|
||||||
|
;fi
|
||||||
|
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
&& apk upgrade \
|
&& apk upgrade \
|
||||||
&& apk add --no-cache bash \
|
&& apk add --no-cache bash \
|
||||||
&& adduser -D -H -u 1000 -s /bin/bash www-data \
|
&& adduser -D -H -u 1000 -s /bin/bash www-data
|
||||||
&& rm /etc/nginx/conf.d/default.conf \
|
|
||||||
&& echo "upstream php-upstream { server ${PHP_UPSTREAM}:9000; }" > /etc/nginx/conf.d/upstream.conf
|
ARG PHP_UPSTREAM_CONTAINER=php-fpm
|
||||||
|
ARG PHP_UPSTREAM_PORT=9000
|
||||||
|
|
||||||
|
# Set upstream conf and remove the default conf
|
||||||
|
RUN echo "upstream php-upstream { server ${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}; }" > /etc/nginx/conf.d/upstream.conf \
|
||||||
|
&& rm /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
CMD ["nginx"]
|
CMD ["nginx"]
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ http {
|
||||||
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
|
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include /etc/nginx/sites-available/*;
|
include /etc/nginx/sites-available/*.conf;
|
||||||
open_file_cache off; # Disabled for issue 619
|
open_file_cache off; # Disabled for issue 619
|
||||||
charset UTF-8;
|
charset UTF-8;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
server_name project-1.dev;
|
server_name app.test;
|
||||||
root /var/www/project-1/public;
|
root /var/www/app;
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
@ -29,4 +29,7 @@ server {
|
||||||
root /var/www/letsencrypt/;
|
root /var/www/letsencrypt/;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_log /var/log/nginx/app_error.log;
|
||||||
|
access_log /var/log/nginx/app_access.log;
|
||||||
}
|
}
|
|
@ -3,8 +3,8 @@ server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
server_name project-2.dev;
|
server_name laravel.test;
|
||||||
root /var/www/project-2/public;
|
root /var/www/laravel/public;
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
@ -29,4 +29,7 @@ server {
|
||||||
root /var/www/letsencrypt/;
|
root /var/www/letsencrypt/;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_log /var/log/nginx/laravel_error.log;
|
||||||
|
access_log /var/log/nginx/laravel_access.log;
|
||||||
}
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
server {
|
||||||
|
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
|
||||||
|
server_name symfony.test;
|
||||||
|
root /var/www/projects/symfony/web;
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri @rewriteapp;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @rewriteapp {
|
||||||
|
rewrite ^(.*)$ /app.php/$1 last;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/(app|app_dev|config)\.php(/|$) {
|
||||||
|
fastcgi_pass php-upstream;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param HTTPS off;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_log /var/log/nginx/symfony_error.log;
|
||||||
|
access_log /var/log/nginx/symfony_access.log;
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
*.sql
|
|
@ -0,0 +1,28 @@
|
||||||
|
###
|
||||||
|
### Copy createdb.sql.example to createdb.sql
|
||||||
|
### then uncomment then set database name and username to create you need databases
|
||||||
|
#
|
||||||
|
# example: .env MYSQL_USER=appuser and need db name is myshop_db
|
||||||
|
#
|
||||||
|
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
|
||||||
|
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
|
||||||
|
#
|
||||||
|
###
|
||||||
|
### this sql script is auto run when percona container start and $DATA_SAVE_PATH/percona not exists.
|
||||||
|
###
|
||||||
|
### if your $DATA_SAVE_PATH/percona is exists and you do not want to delete it, you can run by manual execution:
|
||||||
|
###
|
||||||
|
### docker-compose exec percona bash
|
||||||
|
### mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
|
||||||
|
###
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_1`.* TO 'homestead'@'%' ;
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_2` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_2`.* TO 'homestead'@'%' ;
|
||||||
|
|
||||||
|
#CREATE DATABASE IF NOT EXISTS `dev_db_3` COLLATE 'utf8_general_ci' ;
|
||||||
|
#GRANT ALL ON `dev_db_3`.* TO 'homestead'@'%' ;
|
||||||
|
|
||||||
|
FLUSH PRIVILEGES ;
|
|
@ -1,5 +1,10 @@
|
||||||
FROM fenglc/pgadmin4
|
FROM fenglc/pgadmin4
|
||||||
|
|
||||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
MAINTAINER Huadong Zuo <admin@zuohuadong.cn>
|
||||||
|
|
||||||
|
# user: pgadmin4@pgadmin.org
|
||||||
|
# password: admin
|
||||||
|
# pg_dump & postgresql all in "/usr/bin"
|
||||||
|
# backup in "/var/lib/pgadmin/storage/pgadmin4"
|
||||||
|
|
||||||
EXPOSE 5050
|
EXPOSE 5050
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# Note: Base Image name format {image-tag}-{php-version}
|
# Note: Base Image name format {image-tag}-{php-version}
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM laradock/php-fpm:1.4-56
|
FROM laradock/php-fpm:2.0-56
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
@ -45,11 +45,33 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
ARG INSTALL_SOAP=false
|
ARG INSTALL_SOAP=false
|
||||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||||
# Install the soap extension
|
# Install the soap extension
|
||||||
apt-get -y update && \
|
apt-get update -yqq && \
|
||||||
apt-get -y install libxml2-dev php-soap && \
|
apt-get -y install libxml2-dev php-soap && \
|
||||||
docker-php-ext-install soap \
|
docker-php-ext-install soap \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# pgsql
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PGSQL=false
|
||||||
|
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||||
|
# Install the pgsql extension
|
||||||
|
apt-get update -yqq && \
|
||||||
|
docker-php-ext-install pgsql \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# pgsql client
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PG_CLIENT=false
|
||||||
|
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||||
|
# Install the pgsql clint
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y postgresql-client \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -87,11 +109,22 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||||
ARG INSTALL_PHPREDIS=false
|
ARG INSTALL_PHPREDIS=false
|
||||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
# Install Php Redis Extension
|
# Install Php Redis Extension
|
||||||
pecl install -o -f redis \
|
printf "\n" | pecl install -o -f redis \
|
||||||
&& rm -rf /tmp/pear \
|
&& rm -rf /tmp/pear \
|
||||||
&& docker-php-ext-enable redis \
|
&& docker-php-ext-enable redis \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Swoole EXTENSION FOR PHP 5
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_SWOOLE=false
|
||||||
|
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||||
|
# Install Php Swoole Extension
|
||||||
|
pecl install swoole-2.0.11 \
|
||||||
|
&& docker-php-ext-enable swoole \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# MongoDB:
|
# MongoDB:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -103,6 +136,19 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
docker-php-ext-enable mongodb \
|
docker-php-ext-enable mongodb \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# AMQP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_AMQP=false
|
||||||
|
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install librabbitmq-dev -y && \
|
||||||
|
# Install the amqp extension
|
||||||
|
pecl install amqp && \
|
||||||
|
docker-php-ext-enable amqp \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# ZipArchive:
|
# ZipArchive:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -123,6 +169,18 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||||
docker-php-ext-install bcmath \
|
docker-php-ext-install bcmath \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# GMP (GNU Multiple Precision):
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_GMP=false
|
||||||
|
RUN if [ ${INSTALL_GMP} = true ]; then \
|
||||||
|
# Install the GMP extension
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libgmp-dev && \
|
||||||
|
docker-php-ext-install gmp \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# PHP Memcached:
|
# PHP Memcached:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -148,13 +206,13 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||||
# PHP Aerospike:
|
# PHP Aerospike:
|
||||||
#####################################
|
#####################################
|
||||||
|
|
||||||
ARG INSTALL_AEROSPIKE_EXTENSION=false
|
ARG INSTALL_AEROSPIKE=false
|
||||||
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
|
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||||
# Copy aerospike configration for remote debugging
|
# Copy aerospike configration for remote debugging
|
||||||
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
|
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||||
# Install the php aerospike extension
|
# Install the php aerospike extension
|
||||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
|
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz" \
|
||||||
&& mkdir -p aerospike-client-php \
|
&& mkdir -p aerospike-client-php \
|
||||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||||
&& ( \
|
&& ( \
|
||||||
|
@ -219,10 +277,58 @@ RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||||
ARG INSTALL_GHOSTSCRIPT=false
|
ARG INSTALL_GHOSTSCRIPT=false
|
||||||
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||||
# Install the ghostscript extension for PDF editing
|
# Install the ghostscript extension for PDF editing
|
||||||
apt-get update && \
|
apt-get update -yqq && \
|
||||||
apt-get install -y poppler-utils ghostscript \
|
apt-get install -y poppler-utils ghostscript \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# LDAP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_LDAP=false
|
||||||
|
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libldap2-dev && \
|
||||||
|
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
|
||||||
|
docker-php-ext-install ldap \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
ARG INSTALL_MSSQL=false
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
apt-get -y install php5-sybase freetds-bin && \
|
||||||
|
cp /usr/lib/php5/20131226/*.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ && \
|
||||||
|
docker-php-ext-enable mssql pdo pdo_dblib \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Image optimizers:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||||
|
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# ImageMagick:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGEMAGICK=false
|
||||||
|
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||||
|
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||||
|
apt-get update -y && \
|
||||||
|
apt-get install -y libmagickwand-dev imagemagick && \
|
||||||
|
pecl install imagick && \
|
||||||
|
docker-php-ext-enable imagick \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
@ -230,7 +336,7 @@ RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||||
#
|
#
|
||||||
|
|
||||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
||||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||||
|
|
||||||
#RUN rm -r /var/lib/apt/lists/*
|
#RUN rm -r /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# Note: Base Image name format {image-tag}-{php-version}
|
# Note: Base Image name format {image-tag}-{php-version}
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM laradock/php-fpm:1.4-70
|
FROM laradock/php-fpm:2.0-70
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
@ -45,11 +45,33 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
ARG INSTALL_SOAP=false
|
ARG INSTALL_SOAP=false
|
||||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||||
# Install the soap extension
|
# Install the soap extension
|
||||||
apt-get -y update && \
|
apt-get update -yqq && \
|
||||||
apt-get -y install libxml2-dev php-soap && \
|
apt-get -y install libxml2-dev php-soap && \
|
||||||
docker-php-ext-install soap \
|
docker-php-ext-install soap \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# pgsql
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PGSQL=false
|
||||||
|
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||||
|
# Install the pgsql extension
|
||||||
|
apt-get update -yqq && \
|
||||||
|
docker-php-ext-install pgsql \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# pgsql client
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PG_CLIENT=false
|
||||||
|
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||||
|
# Install the pgsql client
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y postgresql-client \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -84,11 +106,22 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||||
ARG INSTALL_PHPREDIS=false
|
ARG INSTALL_PHPREDIS=false
|
||||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
# Install Php Redis Extension
|
# Install Php Redis Extension
|
||||||
pecl install -o -f redis \
|
printf "\n" | pecl install -o -f redis \
|
||||||
&& rm -rf /tmp/pear \
|
&& rm -rf /tmp/pear \
|
||||||
&& docker-php-ext-enable redis \
|
&& docker-php-ext-enable redis \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Swoole EXTENSION FOR PHP 7
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_SWOOLE=false
|
||||||
|
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||||
|
# Install Php Swoole Extension
|
||||||
|
pecl install swoole \
|
||||||
|
&& docker-php-ext-enable swoole \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# MongoDB:
|
# MongoDB:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -100,6 +133,19 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
docker-php-ext-enable mongodb \
|
docker-php-ext-enable mongodb \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# AMQP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_AMQP=false
|
||||||
|
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install librabbitmq-dev -y && \
|
||||||
|
# Install the amqp extension
|
||||||
|
pecl install amqp && \
|
||||||
|
docker-php-ext-enable amqp \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# ZipArchive:
|
# ZipArchive:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -120,6 +166,18 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||||
docker-php-ext-install bcmath \
|
docker-php-ext-install bcmath \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# GMP (GNU Multiple Precision):
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_GMP=false
|
||||||
|
RUN if [ ${INSTALL_GMP} = true ]; then \
|
||||||
|
# Install the GMP extension
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libgmp-dev && \
|
||||||
|
docker-php-ext-install gmp \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# PHP Memcached:
|
# PHP Memcached:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -156,17 +214,17 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||||
# PHP Aerospike:
|
# PHP Aerospike:
|
||||||
#####################################
|
#####################################
|
||||||
|
|
||||||
ARG INSTALL_AEROSPIKE_EXTENSION=false
|
ARG INSTALL_AEROSPIKE=false
|
||||||
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
|
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||||
# Copy aerospike configration for remote debugging
|
# Copy aerospike configration for remote debugging
|
||||||
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
|
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||||
# Install the php aerospike extension
|
# Install the php aerospike extension
|
||||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
|
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
|
||||||
&& mkdir -p aerospike-client-php \
|
&& mkdir -p aerospike-client-php \
|
||||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||||
&& ( \
|
&& ( \
|
||||||
cd aerospike-client-php/src/aerospike \
|
cd aerospike-client-php/src \
|
||||||
&& phpize \
|
&& phpize \
|
||||||
&& ./build.sh \
|
&& ./build.sh \
|
||||||
&& make install \
|
&& make install \
|
||||||
|
@ -205,86 +263,6 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
|
||||||
docker-php-ext-install tokenizer \
|
docker-php-ext-install tokenizer \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
|
||||||
# SQL SERVER:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
ARG MSSQL=false
|
|
||||||
RUN if [ ${MSSQL} = true ]; then \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install Depenencies:
|
|
||||||
#####################################
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y --force-yes wget apt-transport-https curl freetds-common php5-odbc libsybdb5 freetds-bin unixodbc unixodbc-dev php5-sybase && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# The following steps were taken from
|
|
||||||
# Microsoft's github account:
|
|
||||||
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
# Add PHP 7 repository
|
|
||||||
# for Debian jessie
|
|
||||||
# And System upgrade
|
|
||||||
echo "deb http://packages.dotdeb.org jessie all" \
|
|
||||||
| tee /etc/apt/sources.list.d/dotdeb.list \
|
|
||||||
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
|
|
||||||
| apt-key add - \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get upgrade -qq && \
|
|
||||||
|
|
||||||
# Install UnixODBC
|
|
||||||
# Compile odbc_config as it is not part of unixodbc package
|
|
||||||
apt-get install -y whiptail \
|
|
||||||
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
|
|
||||||
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
|
|
||||||
&& cd unixodbc-*/ \
|
|
||||||
&& dpkg-buildpackage -uc -us -B -d \
|
|
||||||
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
|
|
||||||
|
|
||||||
# Fake uname for install.sh
|
|
||||||
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
|
|
||||||
| tee /usr/local/bin/uname \
|
|
||||||
&& chmod +x /usr/local/bin/uname && \
|
|
||||||
|
|
||||||
# Microsoft ODBC Driver 13 for Linux
|
|
||||||
# Note: There's a copy of this tar on my hubiC
|
|
||||||
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
|
|
||||||
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
&& cd msodbcsql-*/ \
|
|
||||||
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
|
|
||||||
&& ./install.sh install --accept-license \
|
|
||||||
&& ls -l /opt/microsoft/msodbcsql/ \
|
|
||||||
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install pdo_dblib
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
&& docker-php-ext-install pdo \
|
|
||||||
&& docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
|
|
||||||
&& docker-php-ext-install pdo_dblib \
|
|
||||||
&& docker-php-ext-enable pdo_dblib && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install sqlsrv y pdo_sqlsrv
|
|
||||||
# extensions:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
pecl install sqlsrv-4.1.7preview && \
|
|
||||||
pecl install pdo_sqlsrv-4.1.7preview && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Set locales for the container
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
apt-get install -y locales \
|
|
||||||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
|
||||||
&& locale-gen \
|
|
||||||
;fi
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Human Language and Character Encoding Support:
|
# Human Language and Character Encoding Support:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -292,7 +270,7 @@ RUN if [ ${MSSQL} = true ]; then \
|
||||||
ARG INSTALL_INTL=false
|
ARG INSTALL_INTL=false
|
||||||
RUN if [ ${INSTALL_INTL} = true ]; then \
|
RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||||
# Install intl and requirements
|
# Install intl and requirements
|
||||||
apt-get -y update && \
|
apt-get update -yqq && \
|
||||||
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
||||||
docker-php-ext-configure intl && \
|
docker-php-ext-configure intl && \
|
||||||
docker-php-ext-install intl \
|
docker-php-ext-install intl \
|
||||||
|
@ -306,20 +284,83 @@ ARG INSTALL_GHOSTSCRIPT=false
|
||||||
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||||
# Install the ghostscript extension
|
# Install the ghostscript extension
|
||||||
# for PDF editing
|
# for PDF editing
|
||||||
apt-get -y update \
|
apt-get update -yqq \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
poppler-utils \
|
poppler-utils \
|
||||||
ghostscript \
|
ghostscript \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# LDAP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_LDAP=false
|
||||||
|
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libldap2-dev && \
|
||||||
|
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
|
||||||
|
docker-php-ext-install ldap \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_MSSQL=false
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
#####################################
|
||||||
|
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
|
||||||
|
#####################################
|
||||||
|
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
|
||||||
|
apt-get update -yqq \
|
||||||
|
&& apt-get install -y apt-transport-https \
|
||||||
|
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
|
||||||
|
&& curl https://packages.microsoft.com/config/debian/8/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
||||||
|
&& apt-get update -yqq \
|
||||||
|
|
||||||
|
# Install Dependencies
|
||||||
|
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
|
||||||
|
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
||||||
|
&& locale-gen \
|
||||||
|
|
||||||
|
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
|
||||||
|
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
|
||||||
|
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Image optimizers:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||||
|
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# ImageMagick:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGEMAGICK=false
|
||||||
|
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||||
|
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||||
|
apt-get update -y && \
|
||||||
|
apt-get install -y libmagickwand-dev imagemagick && \
|
||||||
|
pecl install imagick && \
|
||||||
|
docker-php-ext-enable imagick \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
|
||||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
ADD ./laravel.ini /usr/local/etc/php/conf.d/
|
||||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||||
|
|
||||||
#RUN rm -r /var/lib/apt/lists/*
|
#RUN rm -r /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# Note: Base Image name format {image-tag}-{php-version}
|
# Note: Base Image name format {image-tag}-{php-version}
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM laradock/php-fpm:1.4-71
|
FROM laradock/php-fpm:2.0-71
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
@ -45,11 +45,33 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
ARG INSTALL_SOAP=false
|
ARG INSTALL_SOAP=false
|
||||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||||
# Install the soap extension
|
# Install the soap extension
|
||||||
apt-get -y update && \
|
apt-get update -yqq && \
|
||||||
apt-get -y install libxml2-dev php-soap && \
|
apt-get -y install libxml2-dev php-soap && \
|
||||||
docker-php-ext-install soap \
|
docker-php-ext-install soap \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# pgsql
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PGSQL=false
|
||||||
|
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||||
|
# Install the pgsql extension
|
||||||
|
apt-get update -yqq && \
|
||||||
|
docker-php-ext-install pgsql \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# pgsql client
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PG_CLIENT=false
|
||||||
|
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||||
|
# Install the pgsql client
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y postgresql-client \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -61,7 +83,7 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
docker-php-ext-enable xdebug \
|
docker-php-ext-enable xdebug \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
# Copy xdebug configration 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
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -78,17 +100,28 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# PHP REDIS EXTENSION FOR PHP 7
|
# PHP REDIS EXTENSION FOR PHP 7.0
|
||||||
#####################################
|
#####################################
|
||||||
|
|
||||||
ARG INSTALL_PHPREDIS=false
|
ARG INSTALL_PHPREDIS=false
|
||||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
# Install Php Redis Extension
|
# Install Php Redis Extension
|
||||||
pecl install -o -f redis \
|
printf "\n" | pecl install -o -f redis \
|
||||||
&& rm -rf /tmp/pear \
|
&& rm -rf /tmp/pear \
|
||||||
&& docker-php-ext-enable redis \
|
&& docker-php-ext-enable redis \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Swoole EXTENSION FOR PHP 7
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_SWOOLE=false
|
||||||
|
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||||
|
# Install Php Swoole Extension
|
||||||
|
pecl install swoole \
|
||||||
|
&& docker-php-ext-enable swoole \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# MongoDB:
|
# MongoDB:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -100,6 +133,19 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
docker-php-ext-enable mongodb \
|
docker-php-ext-enable mongodb \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# AMQP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_AMQP=false
|
||||||
|
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install librabbitmq-dev -y && \
|
||||||
|
# Install the amqp extension
|
||||||
|
pecl install amqp && \
|
||||||
|
docker-php-ext-enable amqp \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# ZipArchive:
|
# ZipArchive:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -120,6 +166,18 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||||
docker-php-ext-install bcmath \
|
docker-php-ext-install bcmath \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# GMP (GNU Multiple Precision):
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_GMP=false
|
||||||
|
RUN if [ ${INSTALL_GMP} = true ]; then \
|
||||||
|
# Install the GMP extension
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libgmp-dev && \
|
||||||
|
docker-php-ext-install gmp \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# PHP Memcached:
|
# PHP Memcached:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -156,23 +214,32 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||||
# PHP Aerospike:
|
# PHP Aerospike:
|
||||||
#####################################
|
#####################################
|
||||||
|
|
||||||
ARG INSTALL_AEROSPIKE_EXTENSION=false
|
ARG INSTALL_AEROSPIKE=false
|
||||||
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
|
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||||
|
|
||||||
# Copy aerospike configration for remote debugging
|
# Copy aerospike configration for remote debugging
|
||||||
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
|
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
|
||||||
|
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||||
|
# Fix dependencies for PHPUnit within aerospike extension
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install sudo wget && \
|
||||||
|
|
||||||
# Install the php aerospike extension
|
# Install the php aerospike extension
|
||||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
|
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
|
||||||
&& mkdir -p aerospike-client-php \
|
&& mkdir -p aerospike-client-php \
|
||||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||||
&& ( \
|
&& ( \
|
||||||
cd aerospike-client-php/src/aerospike \
|
cd aerospike-client-php/src \
|
||||||
&& phpize \
|
&& phpize \
|
||||||
&& ./build.sh \
|
&& ./build.sh \
|
||||||
&& make install \
|
&& make install \
|
||||||
) \
|
) \
|
||||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||||
&& docker-php-ext-enable aerospike \
|
;fi
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
|
||||||
|
rm /usr/local/etc/php/conf.d/aerospike.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -205,86 +272,6 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
|
||||||
docker-php-ext-install tokenizer \
|
docker-php-ext-install tokenizer \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
|
||||||
# SQL SERVER:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
ARG MSSQL=false
|
|
||||||
RUN if [ ${MSSQL} = true ]; then \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install Depenencies:
|
|
||||||
#####################################
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y --force-yes wget apt-transport-https curl freetds-common php5-odbc libsybdb5 freetds-bin unixodbc unixodbc-dev php5-sybase && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# The following steps were taken from
|
|
||||||
# Microsoft's github account:
|
|
||||||
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
# Add PHP 7 repository
|
|
||||||
# for Debian jessie
|
|
||||||
# And System upgrade
|
|
||||||
echo "deb http://packages.dotdeb.org jessie all" \
|
|
||||||
| tee /etc/apt/sources.list.d/dotdeb.list \
|
|
||||||
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
|
|
||||||
| apt-key add - \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get upgrade -qq && \
|
|
||||||
|
|
||||||
# Install UnixODBC
|
|
||||||
# Compile odbc_config as it is not part of unixodbc package
|
|
||||||
apt-get install -y whiptail \
|
|
||||||
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
|
|
||||||
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
|
|
||||||
&& cd unixodbc-*/ \
|
|
||||||
&& dpkg-buildpackage -uc -us -B -d \
|
|
||||||
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
|
|
||||||
|
|
||||||
# Fake uname for install.sh
|
|
||||||
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
|
|
||||||
| tee /usr/local/bin/uname \
|
|
||||||
&& chmod +x /usr/local/bin/uname && \
|
|
||||||
|
|
||||||
# Microsoft ODBC Driver 13 for Linux
|
|
||||||
# Note: There's a copy of this tar on my hubiC
|
|
||||||
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
|
|
||||||
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
&& cd msodbcsql-*/ \
|
|
||||||
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
|
|
||||||
&& ./install.sh install --accept-license \
|
|
||||||
&& ls -l /opt/microsoft/msodbcsql/ \
|
|
||||||
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install pdo_dblib
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
&& docker-php-ext-install pdo \
|
|
||||||
&& docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
|
|
||||||
&& docker-php-ext-install pdo_dblib \
|
|
||||||
&& docker-php-ext-enable pdo_dblib && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install sqlsrv y pdo_sqlsrv
|
|
||||||
# extensions:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
pecl install sqlsrv-4.1.7preview && \
|
|
||||||
pecl install pdo_sqlsrv-4.1.7preview && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Set locales for the container
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
apt-get install -y locales \
|
|
||||||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
|
||||||
&& locale-gen \
|
|
||||||
;fi
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Human Language and Character Encoding Support:
|
# Human Language and Character Encoding Support:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -292,7 +279,7 @@ RUN if [ ${MSSQL} = true ]; then \
|
||||||
ARG INSTALL_INTL=false
|
ARG INSTALL_INTL=false
|
||||||
RUN if [ ${INSTALL_INTL} = true ]; then \
|
RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||||
# Install intl and requirements
|
# Install intl and requirements
|
||||||
apt-get -y update && \
|
apt-get update -yqq && \
|
||||||
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
||||||
docker-php-ext-configure intl && \
|
docker-php-ext-configure intl && \
|
||||||
docker-php-ext-install intl \
|
docker-php-ext-install intl \
|
||||||
|
@ -306,12 +293,73 @@ ARG INSTALL_GHOSTSCRIPT=false
|
||||||
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||||
# Install the ghostscript extension
|
# Install the ghostscript extension
|
||||||
# for PDF editing
|
# for PDF editing
|
||||||
apt-get -y update \
|
apt-get update -yqq \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
poppler-utils \
|
poppler-utils \
|
||||||
ghostscript \
|
ghostscript \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# LDAP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_LDAP=false
|
||||||
|
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libldap2-dev && \
|
||||||
|
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
|
||||||
|
docker-php-ext-install ldap \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_MSSQL=false
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
#####################################
|
||||||
|
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
|
||||||
|
#####################################
|
||||||
|
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
|
||||||
|
apt-get update -yqq && apt-get install -y apt-transport-https \
|
||||||
|
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
|
||||||
|
&& curl https://packages.microsoft.com/config/debian/8/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
||||||
|
&& apt-get update -yqq \
|
||||||
|
|
||||||
|
# Install Dependencies
|
||||||
|
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
|
||||||
|
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
|
||||||
|
|
||||||
|
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
|
||||||
|
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
|
||||||
|
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Image optimizers:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||||
|
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# ImageMagick:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGEMAGICK=false
|
||||||
|
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||||
|
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||||
|
apt-get update -y && \
|
||||||
|
apt-get install -y libmagickwand-dev imagemagick && \
|
||||||
|
pecl install imagick && \
|
||||||
|
docker-php-ext-enable imagick \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
@ -319,7 +367,7 @@ RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||||
#
|
#
|
||||||
|
|
||||||
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
ADD ./laravel.ini /usr/local/etc/php/conf.d
|
||||||
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
|
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||||
|
|
||||||
#RUN rm -r /var/lib/apt/lists/*
|
#RUN rm -r /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
extension=aerospike.so
|
||||||
aerospike.udf.lua_system_path=/usr/local/aerospike/lua
|
aerospike.udf.lua_system_path=/usr/local/aerospike/lua
|
||||||
aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua
|
aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua
|
|
@ -11,6 +11,3 @@ upload_max_filesize = 20M
|
||||||
; Sets max size of post data allowed.
|
; Sets max size of post data allowed.
|
||||||
; http://php.net/post-max-size
|
; http://php.net/post-max-size
|
||||||
post_max_size = 20M
|
post_max_size = 20M
|
||||||
; Enables the MSSQL extensions
|
|
||||||
extension=sqlsrv.so
|
|
||||||
extension=pdo_sqlsrv.so
|
|
|
@ -1442,7 +1442,7 @@ session.save_handler = files
|
||||||
; where MODE is the octal representation of the mode. Note that this
|
; where MODE is the octal representation of the mode. Note that this
|
||||||
; does not overwrite the process's umask.
|
; does not overwrite the process's umask.
|
||||||
; http://php.net/session.save-path
|
; http://php.net/session.save-path
|
||||||
;session.save_path = "/tmp"
|
session.save_path = "/tmp"
|
||||||
|
|
||||||
; Whether to use strict session mode.
|
; Whether to use strict session mode.
|
||||||
; Strict session mode does not accept uninitialized session ID and regenerate
|
; Strict session mode does not accept uninitialized session ID and regenerate
|
||||||
|
|
|
@ -1348,7 +1348,7 @@ session.save_handler = files
|
||||||
; where MODE is the octal representation of the mode. Note that this
|
; where MODE is the octal representation of the mode. Note that this
|
||||||
; does not overwrite the process's umask.
|
; does not overwrite the process's umask.
|
||||||
; http://php.net/session.save-path
|
; http://php.net/session.save-path
|
||||||
;session.save_path = "/tmp"
|
session.save_path = "/tmp"
|
||||||
|
|
||||||
; Whether to use strict session mode.
|
; Whether to use strict session mode.
|
||||||
; Strict session mode does not accept uninitialized session ID and regenerate
|
; Strict session mode does not accept uninitialized session ID and regenerate
|
||||||
|
|
|
@ -1348,7 +1348,7 @@ session.save_handler = files
|
||||||
; where MODE is the octal representation of the mode. Note that this
|
; where MODE is the octal representation of the mode. Note that this
|
||||||
; does not overwrite the process's umask.
|
; does not overwrite the process's umask.
|
||||||
; http://php.net/session.save-path
|
; http://php.net/session.save-path
|
||||||
;session.save_path = "/tmp"
|
session.save_path = "/tmp"
|
||||||
|
|
||||||
; Whether to use strict session mode.
|
; Whether to use strict session mode.
|
||||||
; Strict session mode does not accept uninitialized session ID and regenerate
|
; Strict session mode does not accept uninitialized session ID and regenerate
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
|
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
|
||||||
|
|
||||||
|
; xdebug.remote_host=dockerhost
|
||||||
|
xdebug.remote_connect_back=1
|
||||||
|
xdebug.remote_port=9000
|
||||||
|
xdebug.idekey=PHPSTORM
|
||||||
|
|
||||||
xdebug.remote_autostart=0
|
xdebug.remote_autostart=0
|
||||||
xdebug.remote_enable=0
|
xdebug.remote_enable=0
|
||||||
xdebug.remote_connect_back=0
|
|
||||||
xdebug.cli_color=0
|
xdebug.cli_color=0
|
||||||
xdebug.profiler_enable=0
|
xdebug.profiler_enable=0
|
||||||
|
xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling"
|
||||||
|
|
||||||
xdebug.remote_handler=dbgp
|
xdebug.remote_handler=dbgp
|
||||||
xdebug.remote_mode=req
|
xdebug.remote_mode=req
|
||||||
|
|
||||||
xdebug.remote_port=9000
|
xdebug.var_display_max_children=-1
|
||||||
xdebug.remote_host=dockerhost
|
xdebug.var_display_max_data=-1
|
||||||
xdebug.idekey=PHPSTORM
|
xdebug.var_display_max_depth=-1
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,37 @@
|
||||||
# Image Setup
|
# Image Setup
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# To take a look at the'php-worker' base Image, visit its DockerHub page
|
|
||||||
# https://hub.docker.com/r/nielsvdoorn/laravel-supervisor/
|
|
||||||
#
|
|
||||||
|
|
||||||
FROM nielsvdoorn/laravel-supervisor
|
FROM php:7.0-alpine
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
RUN apk --update add wget \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
build-base \
|
||||||
|
libmemcached-dev \
|
||||||
|
libmcrypt-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
zlib-dev \
|
||||||
|
autoconf \
|
||||||
|
cyrus-sasl-dev \
|
||||||
|
libgsasl-dev \
|
||||||
|
supervisor
|
||||||
|
|
||||||
|
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
|
||||||
|
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
|
||||||
|
|
||||||
|
# Install PostgreSQL drivers:
|
||||||
|
ARG INSTALL_PGSQL=false
|
||||||
|
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||||
|
apk --update add postgresql-dev \
|
||||||
|
&& docker-php-ext-install pdo_pgsql \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
RUN rm /var/cache/apk/* \
|
||||||
|
&& mkdir -p /var/www
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Optional Supervisord Configuration
|
# Optional Supervisord Configuration
|
||||||
|
@ -19,7 +42,10 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Modify the ./supervisor.conf file to match your App's requirements.
|
# Modify the ./supervisor.conf file to match your App's requirements.
|
||||||
# Make sure you rebuild your container with every change.
|
# Make sure you rebuild your container with every change.
|
||||||
#
|
#
|
||||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
||||||
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
|
@ -37,5 +63,4 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
|
||||||
RUN rm -r /var/lib/apt/lists/*
|
|
||||||
WORKDIR /etc/supervisor/conf.d/
|
WORKDIR /etc/supervisor/conf.d/
|
|
@ -0,0 +1,66 @@
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Image Setup
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM php:7.1-alpine
|
||||||
|
|
||||||
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
RUN apk --update add wget \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
build-base \
|
||||||
|
libmemcached-dev \
|
||||||
|
libmcrypt-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
zlib-dev \
|
||||||
|
autoconf \
|
||||||
|
cyrus-sasl-dev \
|
||||||
|
libgsasl-dev \
|
||||||
|
supervisor
|
||||||
|
|
||||||
|
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
|
||||||
|
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
|
||||||
|
|
||||||
|
# Install PostgreSQL drivers:
|
||||||
|
ARG INSTALL_PGSQL=false
|
||||||
|
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||||
|
apk --update add postgresql-dev \
|
||||||
|
&& docker-php-ext-install pdo_pgsql \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
RUN rm /var/cache/apk/* \
|
||||||
|
&& mkdir -p /var/www
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Optional Supervisord Configuration
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Modify the ./supervisor.conf file to match your App's requirements.
|
||||||
|
# Make sure you rebuild your container with every change.
|
||||||
|
#
|
||||||
|
|
||||||
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Optional Software's Installation
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# If you need to modify this image, feel free to do it right here.
|
||||||
|
#
|
||||||
|
# -- Your awesome modifications go here -- #
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Final Touch
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
|
WORKDIR /etc/supervisor/conf.d/
|
|
@ -1,5 +1,11 @@
|
||||||
[supervisord]
|
[supervisord]
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
[supervisorctl]
|
||||||
|
[inet_http_server]
|
||||||
|
port = 127.0.0.1:9001
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
[program:laravel-worker]
|
[program:laravel-worker]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon
|
command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM postgres:latest
|
FROM postgres:alpine
|
||||||
|
|
||||||
MAINTAINER Ben M <git@bmagg.com>
|
MAINTAINER Ben M <git@bmagg.com>
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,13 @@ FROM redis:latest
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
## For security settings uncomment, make the dir, copy conf, and also start with the conf, to use it
|
||||||
|
#RUN mkdir -p /usr/local/etc/redis
|
||||||
#COPY redis.conf /usr/local/etc/redis/redis.conf
|
#COPY redis.conf /usr/local/etc/redis/redis.conf
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
EXPOSE 6379
|
EXPOSE 6379
|
||||||
|
|
||||||
|
#CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
|
||||||
CMD ["redis-server"]
|
CMD ["redis-server"]
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This shell script is an optional tool to simplify
|
||||||
|
# the installation and usage of laradock with docker-sync.
|
||||||
|
|
||||||
|
# Make sure that the DOCKER_SYNC_STRATEGY is set in the .env
|
||||||
|
# DOCKER_SYNC_STRATEGY=native_osx # osx
|
||||||
|
# DOCKER_SYNC_STRATEGY=unison # windows
|
||||||
|
|
||||||
|
# To run, make sure to add permissions to this file:
|
||||||
|
# chmod 755 sync.sh
|
||||||
|
|
||||||
|
# USAGE EXAMPLE:
|
||||||
|
# Install docker-sync: ./sync.sh install
|
||||||
|
# Start sync and services with nginx and mysql: ./sync.sh up nginx mysql
|
||||||
|
# Stop containers and sync: ./sync.sh down
|
||||||
|
|
||||||
|
# prints colored text
|
||||||
|
print_style () {
|
||||||
|
|
||||||
|
if [ "$2" == "info" ] ; then
|
||||||
|
COLOR="96m"
|
||||||
|
elif [ "$2" == "success" ] ; then
|
||||||
|
COLOR="92m"
|
||||||
|
elif [ "$2" == "warning" ] ; then
|
||||||
|
COLOR="93m"
|
||||||
|
elif [ "$2" == "danger" ] ; then
|
||||||
|
COLOR="91m"
|
||||||
|
else #default color
|
||||||
|
COLOR="0m"
|
||||||
|
fi
|
||||||
|
|
||||||
|
STARTCOLOR="\e[$COLOR"
|
||||||
|
ENDCOLOR="\e[0m"
|
||||||
|
|
||||||
|
printf "$STARTCOLOR%b$ENDCOLOR" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
display_options () {
|
||||||
|
printf "Available options:\n";
|
||||||
|
print_style " install" "info"; printf "\t\t Installs docker-sync gem on the host machine.\n"
|
||||||
|
print_style " up [services]" "success"; printf "\t Starts docker-sync and runs docker compose.\n"
|
||||||
|
print_style " down" "success"; printf "\t\t\t Stops containers and docker-sync.\n"
|
||||||
|
print_style " bash" "success"; printf "\t\t\t Opens bash on the workspace.\n"
|
||||||
|
print_style " sync" "info"; printf "\t\t\t Manually triggers the synchronization of files.\n"
|
||||||
|
print_style " clean" "danger"; printf "\t\t Removes all files from docker-sync.\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $# -eq 0 ]] ; then
|
||||||
|
print_style "Missing arguments.\n" "danger"
|
||||||
|
display_options
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" == "up" ] ; then
|
||||||
|
print_style "Initializing Docker Sync\n" "info"
|
||||||
|
print_style "May take a long time (15min+) on the first run\n" "info"
|
||||||
|
docker-sync start;
|
||||||
|
|
||||||
|
print_style "Initializing Docker Compose\n" "info"
|
||||||
|
shift # removing first argument
|
||||||
|
docker-compose up -d ${@}
|
||||||
|
|
||||||
|
elif [ "$1" == "down" ]; then
|
||||||
|
print_style "Stopping Docker Compose\n" "info"
|
||||||
|
docker-compose stop
|
||||||
|
|
||||||
|
print_style "Stopping Docker Sync\n" "info"
|
||||||
|
docker-sync stop
|
||||||
|
|
||||||
|
elif [ "$1" == "bash" ]; then
|
||||||
|
docker-compose exec workspace bash
|
||||||
|
|
||||||
|
elif [ "$1" == "install" ]; then
|
||||||
|
print_style "Installing docker-sync\n" "info"
|
||||||
|
gem install docker-sync
|
||||||
|
|
||||||
|
elif [ "$1" == "sync" ]; then
|
||||||
|
print_style "Manually triggering sync between host and docker-sync container.\n" "info"
|
||||||
|
docker-sync sync;
|
||||||
|
|
||||||
|
elif [ "$1" == "clean" ]; then
|
||||||
|
print_style "Removing and cleaning up files from the docker-sync container.\n" "warning"
|
||||||
|
docker-sync clean
|
||||||
|
else
|
||||||
|
print_style "Invalid arguments.\n" "danger"
|
||||||
|
display_options
|
||||||
|
exit 1
|
||||||
|
fi
|
|
@ -1,7 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
#### halt script on error
|
#### halt script on error
|
||||||
set -e
|
set -xe
|
||||||
|
|
||||||
|
echo '##### Print docker version'
|
||||||
|
docker --version
|
||||||
|
|
||||||
|
echo '##### Print environment'
|
||||||
|
env | sort
|
||||||
|
|
||||||
#### Build the Docker Images
|
#### Build the Docker Images
|
||||||
if [ -n "${PHP_VERSION}" ]; then
|
if [ -n "${PHP_VERSION}" ]; then
|
||||||
|
@ -9,7 +15,7 @@ if [ -n "${PHP_VERSION}" ]; then
|
||||||
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
|
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
|
||||||
sed -i -- 's/=false/=true/g' .env
|
sed -i -- 's/=false/=true/g' .env
|
||||||
cat .env
|
cat .env
|
||||||
docker-compose build
|
docker-compose build ${BUILD_SERVICE}
|
||||||
docker images
|
docker images
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -20,11 +26,13 @@ if [ -n "${HUGO_VERSION}" ]; then
|
||||||
|
|
||||||
# Download hugo binary
|
# Download hugo binary
|
||||||
curl -L https://github.com/spf13/hugo/releases/download/v$HUGO_VERSION/$HUGO_PACKAGE.tar.gz | tar xz
|
curl -L https://github.com/spf13/hugo/releases/download/v$HUGO_VERSION/$HUGO_PACKAGE.tar.gz | tar xz
|
||||||
mkdir $HOME/bin
|
mkdir -p $HOME/bin
|
||||||
mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo
|
mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo
|
||||||
|
|
||||||
# Remove existing docs
|
# Remove existing docs
|
||||||
rm -r ./docs
|
if [ -d "./docs" ]; then
|
||||||
|
rm -r ./docs
|
||||||
|
fi
|
||||||
|
|
||||||
# Build docs
|
# Build docs
|
||||||
cd DOCUMENTATION
|
cd DOCUMENTATION
|
||||||
|
|
|
@ -12,10 +12,13 @@
|
||||||
# Note: Base Image name format {image-tag}-{php-version}
|
# Note: Base Image name format {image-tag}-{php-version}
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM laradock/workspace:1.8-56
|
FROM laradock/workspace:2.0-56
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
# Remove Faillog and Lastlog to reduce the size of the final image.
|
||||||
|
RUN rm /var/log/lastlog /var/log/faillog
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Mandatory Software's Installation
|
# Mandatory Software's Installation
|
||||||
|
@ -46,9 +49,13 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Add a non-root user to prevent files being created with root permissions on host machine.
|
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||||
ARG PUID=1000
|
ARG PUID=1000
|
||||||
ARG PGID=1000
|
ARG PGID=1000
|
||||||
RUN groupadd -g $PGID laradock && \
|
|
||||||
useradd -u $PUID -g laradock -m laradock
|
|
||||||
|
|
||||||
|
ENV PUID ${PUID}
|
||||||
|
ENV PGID ${PGID}
|
||||||
|
|
||||||
|
RUN groupadd -g ${PGID} laradock && \
|
||||||
|
useradd -u ${PUID} -g laradock -m laradock && \
|
||||||
|
apt-get update -yqq
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# SOAP:
|
# SOAP:
|
||||||
|
@ -60,11 +67,39 @@ ENV INSTALL_SOAP ${INSTALL_SOAP}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||||
# Install the PHP SOAP extension
|
# Install the PHP SOAP extension
|
||||||
apt-get -y update && \
|
|
||||||
add-apt-repository -y ppa:ondrej/php && \
|
add-apt-repository -y ppa:ondrej/php && \
|
||||||
|
apt-get update -yqq && \
|
||||||
apt-get -y install libxml2-dev php5.6-soap \
|
apt-get -y install libxml2-dev php5.6-soap \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# LDAP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_LDAP=false
|
||||||
|
ENV INSTALL_LDAP ${INSTALL_LDAP}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libldap2-dev && \
|
||||||
|
apt-get install -y php5.6-ldap \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# IMAP:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_IMAP=false
|
||||||
|
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||||
|
# Install the PHP IMAP extension
|
||||||
|
add-apt-repository -y ppa:ondrej/php && \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install php5.6-imap \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Set Timezone
|
# Set Timezone
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -113,13 +148,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
|
@ -128,9 +167,8 @@ RUN echo "" >> ~/.bashrc && \
|
||||||
ARG INSTALL_XDEBUG=false
|
ARG INSTALL_XDEBUG=false
|
||||||
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 update && \
|
|
||||||
apt-get install -y --force-yes php5.6-xdebug && \
|
apt-get install -y --force-yes php5.6-xdebug && \
|
||||||
sed -i 's/^/;/g' /etc/php/5.6/cli/conf.d/20-xdebug.ini && \
|
sed -i 's/^;//g' /etc/php/5.6/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
|
||||||
# ADD for REMOTE debugging
|
# ADD for REMOTE debugging
|
||||||
|
@ -150,7 +188,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||||
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
|
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
|
||||||
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
|
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
|
||||||
apt-get update && \
|
apt-get update -yqq && \
|
||||||
apt-get install blackfire-agent \
|
apt-get install blackfire-agent \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
@ -171,6 +209,8 @@ RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
|
||||||
&& rm -f /tmp/id_rsa* \
|
&& rm -f /tmp/id_rsa* \
|
||||||
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
||||||
&& chmod 400 /root/.ssh/id_rsa \
|
&& chmod 400 /root/.ssh/id_rsa \
|
||||||
|
&& cp -rf /root/.ssh /home/laradock \
|
||||||
|
&& chown -R laradock:laradock /home/laradock/.ssh \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -182,8 +222,50 @@ ARG INSTALL_MONGO=false
|
||||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
# Install the mongodb extension
|
# Install the mongodb extension
|
||||||
|
pecl channel-update pecl.php.net && \
|
||||||
pecl install mongodb && \
|
pecl install mongodb && \
|
||||||
echo "extension=mongodb.so" >> /etc/php/5.6/cli/conf.d/30-mongodb.ini \
|
echo "extension=mongodb.so" >> /etc/php/5.6/mods-available/mongodb.ini && \
|
||||||
|
ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/30-mongodb.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# AMQP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
# Check if Mongo needs to be installed
|
||||||
|
ARG INSTALL_AMQP=false
|
||||||
|
ENV INSTALL_AMQP ${INSTALL_AMQP}
|
||||||
|
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||||
|
apt-get install librabbitmq-dev -y && \
|
||||||
|
# Install the mongodb extension
|
||||||
|
pecl -q install amqp && \
|
||||||
|
echo "extension=amqp.so" >> /etc/php/5.6/mods-available/amqp.ini && \
|
||||||
|
ln -s /etc/php/5.6/mods-available/amqp.ini /etc/php/5.6/cli/conf.d/30-amqp.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# PHP REDIS EXTENSION FOR PHP 5.6
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PHPREDIS=false
|
||||||
|
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||||
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
|
# Install Php Redis extension
|
||||||
|
printf "\n" | pecl -q install -o -f redis && \
|
||||||
|
echo "extension=redis.so" >> /etc/php/5.6/mods-available/redis.ini && \
|
||||||
|
phpenmod redis \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Swoole EXTENSION FOR PHP 5.6
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_SWOOLE=false
|
||||||
|
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||||
|
# Install Php Swoole Extension
|
||||||
|
pecl -q install swoole-2.0.11 && \
|
||||||
|
echo "extension=swoole.so" >> /etc/php/5.6/mods-available/swoole.ini && \
|
||||||
|
ln -s /etc/php/5.6/mods-available/swoole.ini /etc/php/5.6/cli/conf.d/20-swoole.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -194,12 +276,28 @@ ENV DRUSH_VERSION 8.1.2
|
||||||
ARG INSTALL_DRUSH=false
|
ARG INSTALL_DRUSH=false
|
||||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
# Install Drush 8 with the phar file.
|
# Install Drush 8 with the phar file.
|
||||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
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 && \
|
chmod +x /usr/local/bin/drush && \
|
||||||
drush core-status \
|
drush core-status \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Drupal Console:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_DRUPAL_CONSOLE=false
|
||||||
|
ENV INSTALL_DRUPAL_CONSOLE ${INSTALL_DRUPAL_CONSOLE}
|
||||||
|
RUN if [ ${INSTALL_DRUPAL_CONSOLE} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
|
curl https://drupalconsole.com/installer -L -o drupal.phar && \
|
||||||
|
mv drupal.phar /usr/local/bin/drupal && \
|
||||||
|
chmod +x /usr/local/bin/drupal \
|
||||||
|
;fi
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -239,6 +337,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
# Add PATH for node
|
||||||
|
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# YARN:
|
# YARN:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -275,15 +376,15 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG INSTALL_AEROSPIKE_EXTENSION=true
|
ARG INSTALL_AEROSPIKE=true
|
||||||
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
|
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||||
|
|
||||||
# Copy aerospike configration for remote debugging
|
# Copy aerospike configration for remote debugging
|
||||||
COPY ./aerospike.ini /etc/php/5.6/cli/conf.d/aerospike.ini
|
COPY ./aerospike.ini /etc/php/5.6/cli/conf.d/aerospike.ini
|
||||||
|
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||||
# Install the php aerospike extension
|
# Install the php aerospike extension
|
||||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
|
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz" \
|
||||||
&& mkdir -p aerospike-client-php \
|
&& mkdir -p aerospike-client-php \
|
||||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||||
&& ( \
|
&& ( \
|
||||||
|
@ -295,27 +396,10 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
||||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
|
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
|
||||||
rm /etc/php/5.6/cli/conf.d/aerospike.ini \
|
rm /etc/php/5.6/cli/conf.d/aerospike.ini \
|
||||||
;fi
|
;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/5.6/cli/php.ini \
|
|
||||||
;fi
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Non-root user : PHPUnit path
|
# Non-root user : PHPUnit path
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -326,14 +410,6 @@ USER laradock
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Laravel Artisan Alias
|
|
||||||
#####################################
|
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN echo "" >> ~/.bashrc && \
|
|
||||||
echo 'alias art="php artisan"' >> ~/.bashrc
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Laravel Envoy:
|
# Laravel Envoy:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -347,6 +423,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||||
composer global require "laravel/envoy=~1.0" \
|
composer global require "laravel/envoy=~1.0" \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Laravel Installer:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_LARAVEL_INSTALLER=true
|
||||||
|
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
|
||||||
|
# Install the Laravel Installer
|
||||||
|
echo "" >> ~/.bashrc && \
|
||||||
|
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
|
||||||
|
&& composer global require "laravel/installer" \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Deployer:
|
# Deployer:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -371,7 +464,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
|
|
||||||
# Preparation
|
# Preparation
|
||||||
apt-get update && \
|
|
||||||
apt-get upgrade -y && \
|
apt-get upgrade -y && \
|
||||||
apt-get install -y build-essential make cmake scons curl git \
|
apt-get install -y build-essential make cmake scons curl git \
|
||||||
ruby autoconf automake autoconf-archive \
|
ruby autoconf automake autoconf-archive \
|
||||||
|
@ -380,7 +472,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
libexpat-dev libncurses-dev && \
|
libexpat-dev libncurses-dev && \
|
||||||
|
|
||||||
# Install the Linuxbrew
|
# Install the Linuxbrew
|
||||||
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||||
|
|
||||||
echo "" >> ~/.bashrc && \
|
echo "" >> ~/.bashrc && \
|
||||||
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||||
|
@ -393,6 +485,17 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
ARG INSTALL_MSSQL=false
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
apt-get -y install php5.6-sybase freetds-bin freetds-common libsybdb5 \
|
||||||
|
&& echo "extension=pdo_dblib.so" > /etc/php/5.6/cli/conf.d/20-pdo_dblib.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Minio:
|
# Minio:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -407,8 +510,122 @@ RUN if [ ${INSTALL_MC} = true ]; then\
|
||||||
chmod +x /usr/local/bin/mc \
|
chmod +x /usr/local/bin/mc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Image optimizers:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||||
|
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
|
||||||
|
if [ ${INSTALL_NODE} = true ]; then \
|
||||||
|
. ~/.bashrc && npm install -g svgo \
|
||||||
|
;fi\
|
||||||
|
;fi
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Symfony:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_SYMFONY=false
|
||||||
|
ENV INSTALL_SYMFONY ${INSTALL_SYMFONY}
|
||||||
|
RUN if [ ${INSTALL_SYMFONY} = true ]; then \
|
||||||
|
|
||||||
|
mkdir -p /usr/local/bin \
|
||||||
|
&& curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony \
|
||||||
|
&& chmod a+x /usr/local/bin/symfony \
|
||||||
|
|
||||||
|
# Symfony 3 alias
|
||||||
|
&& echo 'alias dev="php bin/console -e=dev"' >> ~/.bashrc \
|
||||||
|
&& echo 'alias prod="php bin/console -e=prod"' >> ~/.bashrc \
|
||||||
|
|
||||||
|
# Symfony 2 alias
|
||||||
|
# && echo 'alias dev="php app/console -e=dev"' >> ~/.bashrc \
|
||||||
|
# && echo 'alias prod="php app/console -e=prod"' >> ~/.bashrc \
|
||||||
|
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# PYTHON:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PYTHON=false
|
||||||
|
ENV INSTALL_PYTHON ${INSTALL_PYTHON}
|
||||||
|
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||||
|
apt-get update \
|
||||||
|
&& apt-get -y install python python-pip python-dev build-essential \
|
||||||
|
&& pip install --upgrade pip \
|
||||||
|
&& pip install --upgrade virtualenv \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# ImageMagick:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGEMAGICK=false
|
||||||
|
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||||
|
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||||
|
apt-get install -y --force-yes imagemagick php-imagick \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Terraform:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_TERRAFORM=false
|
||||||
|
ENV INSTALL_TERRAFORM ${INSTALL_TERRAFORM}
|
||||||
|
RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
|
||||||
|
apt-get update -yqq \
|
||||||
|
&& apt-get -y install sudo wget unzip \
|
||||||
|
&& wget https://releases.hashicorp.com/terraform/0.10.6/terraform_0.10.6_linux_amd64.zip \
|
||||||
|
&& unzip terraform_0.10.6_linux_amd64.zip \
|
||||||
|
&& mv terraform /usr/local/bin \
|
||||||
|
&& rm terraform_0.10.6_linux_amd64.zip \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# pgsql client
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_PG_CLIENT=false
|
||||||
|
ENV INSTALL_PG_CLIENT ${INSTALL_PG_CLIENT}
|
||||||
|
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||||
|
# Install the pgsql clint
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install postgresql-client \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Dusk Dependencies:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_DUSK_DEPS=false
|
||||||
|
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
|
||||||
|
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
|
||||||
|
# Install required packages
|
||||||
|
add-apt-repository ppa:ondrej/php \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get -y install zip wget unzip xdg-utils \
|
||||||
|
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
|
||||||
|
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
|
||||||
|
xfonts-base xfonts-scalable x11-apps \
|
||||||
|
|
||||||
|
# Install Google Chrome
|
||||||
|
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||||
|
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||||
|
&& apt-get -y -f install \
|
||||||
|
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||||
|
&& rm google-chrome-stable_current_amd64.deb \
|
||||||
|
|
||||||
|
# Install Chrome Driver
|
||||||
|
&& wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \
|
||||||
|
&& unzip chromedriver_linux64.zip \
|
||||||
|
&& mv chromedriver /usr/local/bin/ \
|
||||||
|
&& rm chromedriver_linux64.zip \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
|
|
@ -12,10 +12,13 @@
|
||||||
# Note: Base Image name format {image-tag}-{php-version}
|
# Note: Base Image name format {image-tag}-{php-version}
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM laradock/workspace:1.8-70
|
FROM laradock/workspace:2.0-70
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
# Remove Faillog and Lastlog to reduce the size of the final image.
|
||||||
|
RUN rm /var/log/lastlog /var/log/faillog
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Mandatory Software's Installation
|
# Mandatory Software's Installation
|
||||||
|
@ -46,9 +49,13 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Add a non-root user to prevent files being created with root permissions on host machine.
|
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||||
ARG PUID=1000
|
ARG PUID=1000
|
||||||
ARG PGID=1000
|
ARG PGID=1000
|
||||||
RUN groupadd -g $PGID laradock && \
|
|
||||||
useradd -u $PUID -g laradock -m laradock
|
|
||||||
|
|
||||||
|
ENV PUID ${PUID}
|
||||||
|
ENV PGID ${PGID}
|
||||||
|
|
||||||
|
RUN groupadd -g ${PGID} laradock && \
|
||||||
|
useradd -u ${PUID} -g laradock -m laradock && \
|
||||||
|
apt-get update -yqq
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# SOAP:
|
# SOAP:
|
||||||
|
@ -60,11 +67,36 @@ ENV INSTALL_SOAP ${INSTALL_SOAP}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||||
# Install the PHP SOAP extension
|
# Install the PHP SOAP extension
|
||||||
apt-get -y update && \
|
|
||||||
add-apt-repository -y ppa:ondrej/php && \
|
add-apt-repository -y ppa:ondrej/php && \
|
||||||
|
apt-get update -yqq && \
|
||||||
apt-get -y install libxml2-dev php7.0-soap \
|
apt-get -y install libxml2-dev php7.0-soap \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# LDAP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_LDAP=false
|
||||||
|
ENV INSTALL_LDAP ${INSTALL_LDAP}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libldap2-dev && \
|
||||||
|
apt-get install -y php7.0-ldap \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# IMAP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_IMAP=false
|
||||||
|
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y php7.0-imap \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Set Timezone
|
# Set Timezone
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -113,13 +145,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
|
@ -128,9 +164,8 @@ RUN echo "" >> ~/.bashrc && \
|
||||||
ARG INSTALL_XDEBUG=false
|
ARG INSTALL_XDEBUG=false
|
||||||
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 update && \
|
|
||||||
apt-get install -y --force-yes php7.0-xdebug && \
|
apt-get install -y --force-yes php7.0-xdebug && \
|
||||||
sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini && \
|
sed -i 's/^;//g' /etc/php/7.0/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
|
||||||
# ADD for REMOTE debugging
|
# ADD for REMOTE debugging
|
||||||
|
@ -150,7 +185,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||||
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
|
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
|
||||||
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
|
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
|
||||||
apt-get update && \
|
apt-get update -yqq && \
|
||||||
apt-get install blackfire-agent \
|
apt-get install blackfire-agent \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
@ -171,6 +206,8 @@ RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
|
||||||
&& rm -f /tmp/id_rsa* \
|
&& rm -f /tmp/id_rsa* \
|
||||||
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
||||||
&& chmod 400 /root/.ssh/id_rsa \
|
&& chmod 400 /root/.ssh/id_rsa \
|
||||||
|
&& cp -rf /root/.ssh /home/laradock \
|
||||||
|
&& chown -R laradock:laradock /home/laradock/.ssh \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -183,7 +220,48 @@ ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
# Install the mongodb extension
|
# Install the mongodb extension
|
||||||
pecl install mongodb && \
|
pecl install mongodb && \
|
||||||
echo "extension=mongodb.so" >> /etc/php/7.0/cli/conf.d/30-mongodb.ini \
|
echo "extension=mongodb.so" >> /etc/php/7.0/mods-available/mongodb.ini && \
|
||||||
|
ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# AMQP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
# Check if Mongo needs to be installed
|
||||||
|
ARG INSTALL_AMQP=false
|
||||||
|
ENV INSTALL_AMQP ${INSTALL_AMQP}
|
||||||
|
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||||
|
apt-get install librabbitmq-dev -y && \
|
||||||
|
# Install the mongodb extension
|
||||||
|
pecl -q install amqp && \
|
||||||
|
echo "extension=amqp.so" >> /etc/php/7.0/mods-available/amqp.ini && \
|
||||||
|
ln -s /etc/php/7.0/mods-available/amqp.ini /etc/php/7.0/cli/conf.d/30-amqp.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# PHP REDIS EXTENSION FOR PHP 7
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PHPREDIS=false
|
||||||
|
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||||
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
|
# Install Php Redis extension
|
||||||
|
printf "\n" | pecl -q install -o -f redis && \
|
||||||
|
echo "extension=redis.so" >> /etc/php/7.0/mods-available/redis.ini && \
|
||||||
|
phpenmod redis \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Swoole EXTENSION FOR PHP 7
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_SWOOLE=false
|
||||||
|
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||||
|
# Install Php Swoole Extension
|
||||||
|
pecl -q install swoole && \
|
||||||
|
echo "extension=swoole.so" >> /etc/php/7.0/mods-available/swoole.ini && \
|
||||||
|
ln -s /etc/php/7.0/mods-available/swoole.ini /etc/php/7.0/cli/conf.d/20-swoole.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -194,12 +272,28 @@ ENV DRUSH_VERSION 8.1.2
|
||||||
ARG INSTALL_DRUSH=false
|
ARG INSTALL_DRUSH=false
|
||||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
# Install Drush 8 with the phar file.
|
# Install Drush 8 with the phar file.
|
||||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
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 && \
|
chmod +x /usr/local/bin/drush && \
|
||||||
drush core-status \
|
drush core-status \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Drupal Console:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_DRUPAL_CONSOLE=false
|
||||||
|
ENV INSTALL_DRUPAL_CONSOLE ${INSTALL_DRUPAL_CONSOLE}
|
||||||
|
RUN if [ ${INSTALL_DRUPAL_CONSOLE} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
|
curl https://drupalconsole.com/installer -L -o drupal.phar && \
|
||||||
|
mv drupal.phar /usr/local/bin/drupal && \
|
||||||
|
chmod +x /usr/local/bin/drupal \
|
||||||
|
;fi
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -239,6 +333,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
# Add PATH for node
|
||||||
|
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# YARN:
|
# YARN:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -275,19 +372,19 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG INSTALL_AEROSPIKE_EXTENSION=true
|
ARG INSTALL_AEROSPIKE=true
|
||||||
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
|
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||||
|
|
||||||
# Copy aerospike configration for remote debugging
|
# Copy aerospike configration for remote debugging
|
||||||
COPY ./aerospike.ini /etc/php/7.0/cli/conf.d/aerospike.ini
|
COPY ./aerospike.ini /etc/php/7.0/cli/conf.d/aerospike.ini
|
||||||
|
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||||
# Install the php aerospike extension
|
# Install the php aerospike extension
|
||||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
|
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
|
||||||
&& mkdir -p aerospike-client-php \
|
&& mkdir -p aerospike-client-php \
|
||||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||||
&& ( \
|
&& ( \
|
||||||
cd aerospike-client-php/src/aerospike \
|
cd aerospike-client-php/src \
|
||||||
&& phpize \
|
&& phpize \
|
||||||
&& ./build.sh \
|
&& ./build.sh \
|
||||||
&& make install \
|
&& make install \
|
||||||
|
@ -295,7 +392,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
||||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
|
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
|
||||||
rm /etc/php/7.0/cli/conf.d/aerospike.ini \
|
rm /etc/php/7.0/cli/conf.d/aerospike.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
@ -304,14 +401,14 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
|
||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG INSTALL_V8JS_EXTENSION=false
|
ARG INSTALL_V8JS=false
|
||||||
ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION}
|
ENV INSTALL_V8JS ${INSTALL_V8JS}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \
|
RUN if [ ${INSTALL_V8JS} = true ]; then \
|
||||||
# Install the php V8JS extension
|
# Install the php V8JS extension
|
||||||
add-apt-repository -y ppa:pinepain/libv8-5.4 \
|
add-apt-repository -y ppa:pinepain/libv8-5.4 \
|
||||||
&& apt-get update \
|
&& apt-get update -yqq \
|
||||||
&& apt-get install -y php-dev php-pear libv8-5.4 \
|
&& apt-get install -y php7.0-xml php7.0-dev php-pear libv8-5.4 \
|
||||||
&& pecl install v8js \
|
&& pecl install v8js \
|
||||||
&& echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \
|
&& echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \
|
||||||
;fi
|
;fi
|
||||||
|
@ -326,14 +423,6 @@ USER laradock
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Laravel Artisan Alias
|
|
||||||
#####################################
|
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN echo "" >> ~/.bashrc && \
|
|
||||||
echo 'alias art="php artisan"' >> ~/.bashrc
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Laravel Envoy:
|
# Laravel Envoy:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -347,6 +436,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||||
composer global require "laravel/envoy=~1.0" \
|
composer global require "laravel/envoy=~1.0" \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Laravel Installer:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_LARAVEL_INSTALLER=true
|
||||||
|
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
|
||||||
|
# Install the Laravel Installer
|
||||||
|
echo "" >> ~/.bashrc && \
|
||||||
|
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
|
||||||
|
&& composer global require "laravel/installer" \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Deployer:
|
# Deployer:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -371,7 +477,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
|
|
||||||
# Preparation
|
# Preparation
|
||||||
apt-get update && \
|
|
||||||
apt-get upgrade -y && \
|
apt-get upgrade -y && \
|
||||||
apt-get install -y build-essential make cmake scons curl git \
|
apt-get install -y build-essential make cmake scons curl git \
|
||||||
ruby autoconf automake autoconf-archive \
|
ruby autoconf automake autoconf-archive \
|
||||||
|
@ -380,7 +485,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
libexpat-dev libncurses-dev && \
|
libexpat-dev libncurses-dev && \
|
||||||
|
|
||||||
# Install the Linuxbrew
|
# Install the Linuxbrew
|
||||||
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||||
|
|
||||||
echo "" >> ~/.bashrc && \
|
echo "" >> ~/.bashrc && \
|
||||||
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||||
|
@ -393,6 +498,83 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
ARG INSTALL_MSSQL=true
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
#####################################
|
||||||
|
# Install Depenencies:
|
||||||
|
#####################################
|
||||||
|
cd / && \
|
||||||
|
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# The following steps were taken from
|
||||||
|
# Microsoft's github account:
|
||||||
|
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
# Add PHP 7 repository
|
||||||
|
# for Debian jessie
|
||||||
|
# And System upgrade
|
||||||
|
cd / && \
|
||||||
|
echo "deb http://packages.dotdeb.org jessie all" \
|
||||||
|
| tee /etc/apt/sources.list.d/dotdeb.list \
|
||||||
|
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
|
||||||
|
| apt-key add - \
|
||||||
|
&& apt-get update -yqq \
|
||||||
|
&& apt-get upgrade -qq && \
|
||||||
|
|
||||||
|
# Install UnixODBC
|
||||||
|
# Compile odbc_config as it is not part of unixodbc package
|
||||||
|
cd / && \
|
||||||
|
apt-get install -y whiptail \
|
||||||
|
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
|
||||||
|
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
|
||||||
|
&& cd unixodbc-*/ \
|
||||||
|
&& ./configure && make && make install \
|
||||||
|
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
|
||||||
|
|
||||||
|
# Fake uname for install.sh
|
||||||
|
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
|
||||||
|
| tee /usr/local/bin/uname \
|
||||||
|
&& chmod +x /usr/local/bin/uname && \
|
||||||
|
|
||||||
|
# Microsoft ODBC Driver 13 for Linux
|
||||||
|
# Note: There's a copy of this tar on my hubiC
|
||||||
|
cd / && \
|
||||||
|
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
|
||||||
|
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
|
||||||
|
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
|
||||||
|
&& cd msodbcsql-*/ \
|
||||||
|
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
|
||||||
|
&& ./install.sh install --accept-license \
|
||||||
|
&& ls -l /opt/microsoft/msodbcsql/ \
|
||||||
|
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
|
||||||
|
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Install sqlsrv y pdo_sqlsrv
|
||||||
|
# extensions:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
pecl install sqlsrv-4.0.8 && \
|
||||||
|
pecl install pdo_sqlsrv-4.0.8 && \
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Set locales for the container
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
apt-get install -y locales \
|
||||||
|
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
||||||
|
&& locale-gen \
|
||||||
|
&& echo "extension=sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-sqlsrv.ini \
|
||||||
|
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-pdo_sqlsrv.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Minio:
|
# Minio:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -407,6 +589,19 @@ RUN if [ ${INSTALL_MC} = true ]; then\
|
||||||
chmod +x /usr/local/bin/mc \
|
chmod +x /usr/local/bin/mc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Image optimizers:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||||
|
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
|
||||||
|
if [ ${INSTALL_NODE} = true ]; then \
|
||||||
|
. ~/.bashrc && npm install -g svgo \
|
||||||
|
;fi\
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Symfony:
|
# Symfony:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -429,7 +624,84 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
|
||||||
|
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
USER laradock
|
#####################################
|
||||||
|
# PYTHON:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PYTHON=false
|
||||||
|
ENV INSTALL_PYTHON ${INSTALL_PYTHON}
|
||||||
|
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||||
|
apt-get update \
|
||||||
|
&& apt-get -y install python python-pip python-dev build-essential \
|
||||||
|
&& pip install --upgrade pip \
|
||||||
|
&& pip install --upgrade virtualenv \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# ImageMagick:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGEMAGICK=false
|
||||||
|
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||||
|
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||||
|
apt-get install -y --force-yes imagemagick php-imagick \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Terraform:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_TERRAFORM=false
|
||||||
|
ENV INSTALL_TERRAFORM ${INSTALL_TERRAFORM}
|
||||||
|
RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
|
||||||
|
apt-get update -yqq \
|
||||||
|
&& apt-get -y install sudo wget unzip \
|
||||||
|
&& wget https://releases.hashicorp.com/terraform/0.10.6/terraform_0.10.6_linux_amd64.zip \
|
||||||
|
&& unzip terraform_0.10.6_linux_amd64.zip \
|
||||||
|
&& mv terraform /usr/local/bin \
|
||||||
|
&& rm terraform_0.10.6_linux_amd64.zip \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# pgsql client
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_PG_CLIENT=false
|
||||||
|
ENV INSTALL_PG_CLIENT ${INSTALL_PG_CLIENT}
|
||||||
|
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||||
|
# Install the pgsql client
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install postgresql-client \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Dusk Dependencies:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_DUSK_DEPS=false
|
||||||
|
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
|
||||||
|
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
|
||||||
|
# Install required packages
|
||||||
|
add-apt-repository ppa:ondrej/php \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get -y install zip wget unzip xdg-utils \
|
||||||
|
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
|
||||||
|
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
|
||||||
|
xfonts-base xfonts-scalable x11-apps \
|
||||||
|
|
||||||
|
# Install Google Chrome
|
||||||
|
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||||
|
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||||
|
&& apt-get -y -f install \
|
||||||
|
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||||
|
&& rm google-chrome-stable_current_amd64.deb \
|
||||||
|
|
||||||
|
# Install Chrome Driver
|
||||||
|
&& wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \
|
||||||
|
&& unzip chromedriver_linux64.zip \
|
||||||
|
&& mv chromedriver /usr/local/bin/ \
|
||||||
|
&& rm chromedriver_linux64.zip \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
|
|
|
@ -12,10 +12,13 @@
|
||||||
# Note: Base Image name format {image-tag}-{php-version}
|
# Note: Base Image name format {image-tag}-{php-version}
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM laradock/workspace:1.8-71
|
FROM laradock/workspace:2.0-71
|
||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
# Remove Faillog and Lastlog to reduce the size of the final image.
|
||||||
|
RUN rm /var/log/lastlog /var/log/faillog
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Mandatory Software's Installation
|
# Mandatory Software's Installation
|
||||||
|
@ -46,9 +49,12 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Add a non-root user to prevent files being created with root permissions on host machine.
|
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||||
ARG PUID=1000
|
ARG PUID=1000
|
||||||
ARG PGID=1000
|
ARG PGID=1000
|
||||||
RUN groupadd -g $PGID laradock && \
|
|
||||||
useradd -u $PUID -g laradock -m laradock
|
|
||||||
|
|
||||||
|
ENV PUID ${PUID}
|
||||||
|
ENV PGID ${PGID}
|
||||||
|
|
||||||
|
RUN groupadd -g ${PGID} laradock && \
|
||||||
|
useradd -u ${PUID} -g laradock -m laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# SOAP:
|
# SOAP:
|
||||||
|
@ -60,11 +66,36 @@ ENV INSTALL_SOAP ${INSTALL_SOAP}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||||
# Install the PHP SOAP extension
|
# Install the PHP SOAP extension
|
||||||
apt-get -y update && \
|
|
||||||
add-apt-repository -y ppa:ondrej/php && \
|
add-apt-repository -y ppa:ondrej/php && \
|
||||||
|
apt-get update -yqq && \
|
||||||
apt-get -y install libxml2-dev php7.1-soap \
|
apt-get -y install libxml2-dev php7.1-soap \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# LDAP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_LDAP=false
|
||||||
|
ENV INSTALL_LDAP ${INSTALL_LDAP}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y libldap2-dev && \
|
||||||
|
apt-get install -y php7.1-ldap \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# IMAP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_IMAP=false
|
||||||
|
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y php7.1-imap \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Set Timezone
|
# Set Timezone
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -109,13 +140,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||||
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
|
||||||
echo "" >> ~/.bashrc
|
echo "" >> ~/.bashrc && \
|
||||||
|
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||||
|
sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# xDebug:
|
# xDebug:
|
||||||
|
@ -125,8 +160,8 @@ ARG INSTALL_XDEBUG=false
|
||||||
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 update && \
|
apt-get update && \
|
||||||
apt-get install -y --force-yes php-xdebug && \
|
apt-get install -y --force-yes php7.1-xdebug && \
|
||||||
sed -i 's/^/;/g' /etc/php/7.1/cli/conf.d/20-xdebug.ini && \
|
sed -i 's/^;//g' /etc/php/7.1/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
|
||||||
# ADD for REMOTE debugging
|
# ADD for REMOTE debugging
|
||||||
|
@ -146,7 +181,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||||
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
|
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
|
||||||
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
|
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
|
||||||
apt-get update && \
|
apt-get update -yqq && \
|
||||||
apt-get install blackfire-agent \
|
apt-get install blackfire-agent \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
@ -167,6 +202,8 @@ RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
|
||||||
&& rm -f /tmp/id_rsa* \
|
&& rm -f /tmp/id_rsa* \
|
||||||
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
||||||
&& chmod 400 /root/.ssh/id_rsa \
|
&& chmod 400 /root/.ssh/id_rsa \
|
||||||
|
&& cp -rf /root/.ssh /home/laradock \
|
||||||
|
&& chown -R laradock:laradock /home/laradock/.ssh \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -178,8 +215,49 @@ ARG INSTALL_MONGO=false
|
||||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
# Install the mongodb extension
|
# Install the mongodb extension
|
||||||
pecl install mongodb && \
|
pecl -q install mongodb && \
|
||||||
echo "extension=mongodb.so" >> /etc/php/7.1/cli/conf.d/30-mongodb.ini \
|
echo "extension=mongodb.so" >> /etc/php/7.1/mods-available/mongodb.ini && \
|
||||||
|
ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# AMQP:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
# Check if Mongo needs to be installed
|
||||||
|
ARG INSTALL_AMQP=false
|
||||||
|
ENV INSTALL_AMQP ${INSTALL_AMQP}
|
||||||
|
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||||
|
apt-get install librabbitmq-dev -y && \
|
||||||
|
# Install the mongodb extension
|
||||||
|
pecl -q install amqp && \
|
||||||
|
echo "extension=amqp.so" >> /etc/php/7.1/mods-available/amqp.ini && \
|
||||||
|
ln -s /etc/php/7.1/mods-available/amqp.ini /etc/php/7.1/cli/conf.d/30-amqp.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# PHP REDIS EXTENSION FOR PHP 7.1
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PHPREDIS=false
|
||||||
|
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
|
||||||
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
|
# Install Php Redis extension
|
||||||
|
printf "\n" | pecl -q install -o -f redis && \
|
||||||
|
echo "extension=redis.so" >> /etc/php/7.1/mods-available/redis.ini && \
|
||||||
|
phpenmod redis \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Swoole EXTENSION FOR PHP 7
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_SWOOLE=false
|
||||||
|
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||||
|
# Install Php Swoole Extension
|
||||||
|
pecl -q install swoole && \
|
||||||
|
echo "extension=swoole.so" >> /etc/php/7.1/mods-available/swoole.ini && \
|
||||||
|
ln -s /etc/php/7.1/mods-available/swoole.ini /etc/php/7.1/cli/conf.d/20-swoole.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -190,12 +268,28 @@ ENV DRUSH_VERSION 8.1.2
|
||||||
ARG INSTALL_DRUSH=false
|
ARG INSTALL_DRUSH=false
|
||||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
# Install Drush 8 with the phar file.
|
# Install Drush 8 with the phar file.
|
||||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
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 && \
|
chmod +x /usr/local/bin/drush && \
|
||||||
drush core-status \
|
drush core-status \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Drupal Console:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_DRUPAL_CONSOLE=false
|
||||||
|
ENV INSTALL_DRUPAL_CONSOLE ${INSTALL_DRUPAL_CONSOLE}
|
||||||
|
RUN if [ ${INSTALL_DRUPAL_CONSOLE} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
|
curl https://drupalconsole.com/installer -L -o drupal.phar && \
|
||||||
|
mv drupal.phar /usr/local/bin/drupal && \
|
||||||
|
chmod +x /usr/local/bin/drupal \
|
||||||
|
;fi
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -235,6 +329,10 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
# Add PATH for node
|
||||||
|
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# YARN:
|
# YARN:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -271,19 +369,23 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG INSTALL_AEROSPIKE_EXTENSION=true
|
ARG INSTALL_AEROSPIKE=false
|
||||||
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
|
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||||
|
|
||||||
# Copy aerospike configration for remote debugging
|
# Copy aerospike configration for remote debugging
|
||||||
COPY ./aerospike.ini /etc/php/7.1/cli/conf.d/aerospike.ini
|
COPY ./aerospike.ini /etc/php/7.1/cli/conf.d/aerospike.ini
|
||||||
|
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||||
|
# Fix dependencies for PHPUnit within aerospike extension
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install sudo wget && \
|
||||||
|
|
||||||
# Install the php aerospike extension
|
# Install the php aerospike extension
|
||||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
|
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
|
||||||
&& mkdir -p aerospike-client-php \
|
&& mkdir -p aerospike-client-php \
|
||||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||||
&& ( \
|
&& ( \
|
||||||
cd aerospike-client-php/src/aerospike \
|
cd aerospike-client-php/src \
|
||||||
&& phpize \
|
&& phpize \
|
||||||
&& ./build.sh \
|
&& ./build.sh \
|
||||||
&& make install \
|
&& make install \
|
||||||
|
@ -291,7 +393,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
||||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
|
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
|
||||||
rm /etc/php/7.1/cli/conf.d/aerospike.ini \
|
rm /etc/php/7.1/cli/conf.d/aerospike.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
@ -300,14 +402,14 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
|
||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG INSTALL_V8JS_EXTENSION=false
|
ARG INSTALL_V8JS=false
|
||||||
ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION}
|
ENV INSTALL_V8JS ${INSTALL_V8JS}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \
|
RUN if [ ${INSTALL_V8JS} = true ]; then \
|
||||||
# Install the php V8JS extension
|
# Install the php V8JS extension
|
||||||
add-apt-repository -y ppa:pinepain/libv8-5.4 \
|
add-apt-repository -y ppa:pinepain/libv8-5.4 \
|
||||||
&& apt-get update \
|
&& apt-get update -yqq \
|
||||||
&& apt-get install -y php-dev php-pear libv8-5.4 \
|
&& apt-get install -y php-xml php-dev php-pear libv8-5.4 \
|
||||||
&& pecl install v8js \
|
&& pecl install v8js \
|
||||||
&& echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini \
|
&& echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini \
|
||||||
;fi
|
;fi
|
||||||
|
@ -322,20 +424,12 @@ USER laradock
|
||||||
RUN echo "" >> ~/.bashrc && \
|
RUN echo "" >> ~/.bashrc && \
|
||||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Laravel Artisan Alias
|
|
||||||
#####################################
|
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN echo "" >> ~/.bashrc && \
|
|
||||||
echo 'alias art="php artisan"' >> ~/.bashrc
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Laravel Envoy:
|
# Laravel Envoy:
|
||||||
#####################################
|
#####################################
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
ARG INSTALL_LARAVEL_ENVOY=true
|
ARG INSTALL_LARAVEL_ENVOY=false
|
||||||
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||||
|
@ -343,6 +437,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||||
composer global require "laravel/envoy=~1.0" \
|
composer global require "laravel/envoy=~1.0" \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Laravel Installer:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_LARAVEL_INSTALLER=false
|
||||||
|
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
|
||||||
|
# Install the Laravel Installer
|
||||||
|
echo "" >> ~/.bashrc && \
|
||||||
|
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
|
||||||
|
&& composer global require "laravel/installer" \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Deployer:
|
# Deployer:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -361,13 +472,12 @@ RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
|
||||||
#####################################
|
#####################################
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
ARG INSTALL_LINUXBREW=true
|
ARG INSTALL_LINUXBREW=false
|
||||||
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
|
|
||||||
# Preparation
|
# Preparation
|
||||||
apt-get update && \
|
|
||||||
apt-get upgrade -y && \
|
apt-get upgrade -y && \
|
||||||
apt-get install -y build-essential make cmake scons curl git \
|
apt-get install -y build-essential make cmake scons curl git \
|
||||||
ruby autoconf automake autoconf-archive \
|
ruby autoconf automake autoconf-archive \
|
||||||
|
@ -376,7 +486,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
libexpat-dev libncurses-dev && \
|
libexpat-dev libncurses-dev && \
|
||||||
|
|
||||||
# Install the Linuxbrew
|
# Install the Linuxbrew
|
||||||
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||||
|
|
||||||
echo "" >> ~/.bashrc && \
|
echo "" >> ~/.bashrc && \
|
||||||
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||||
|
@ -389,6 +499,85 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SQL SERVER:
|
||||||
|
#####################################
|
||||||
|
ARG INSTALL_MSSQL=false
|
||||||
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
|
#####################################
|
||||||
|
# Install Depenencies:
|
||||||
|
#####################################
|
||||||
|
cd / && \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# The following steps were taken from
|
||||||
|
# Microsoft's github account:
|
||||||
|
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
# Add PHP 7 repository
|
||||||
|
# for Debian jessie
|
||||||
|
# And System upgrade
|
||||||
|
cd / && \
|
||||||
|
echo "deb http://packages.dotdeb.org jessie all" \
|
||||||
|
| tee /etc/apt/sources.list.d/dotdeb.list \
|
||||||
|
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
|
||||||
|
| apt-key add - \
|
||||||
|
&& apt-get update -yqq \
|
||||||
|
&& apt-get upgrade -qq && \
|
||||||
|
|
||||||
|
# Install UnixODBC
|
||||||
|
# Compile odbc_config as it is not part of unixodbc package
|
||||||
|
cd / && \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get install -y whiptail \
|
||||||
|
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
|
||||||
|
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
|
||||||
|
&& cd unixodbc-*/ \
|
||||||
|
&& ./configure && make && make install \
|
||||||
|
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
|
||||||
|
|
||||||
|
# Fake uname for install.sh
|
||||||
|
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
|
||||||
|
| tee /usr/local/bin/uname \
|
||||||
|
&& chmod +x /usr/local/bin/uname && \
|
||||||
|
|
||||||
|
# Microsoft ODBC Driver 13 for Linux
|
||||||
|
# Note: There's a copy of this tar on my hubiC
|
||||||
|
cd / && \
|
||||||
|
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
|
||||||
|
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
|
||||||
|
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
|
||||||
|
&& cd msodbcsql-*/ \
|
||||||
|
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
|
||||||
|
&& ./install.sh install --accept-license \
|
||||||
|
&& ls -l /opt/microsoft/msodbcsql/ \
|
||||||
|
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
|
||||||
|
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Install sqlsrv y pdo_sqlsrv
|
||||||
|
# extensions:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
pecl install sqlsrv-4.0.8 && \
|
||||||
|
pecl install pdo_sqlsrv-4.0.8 && \
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Set locales for the container
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
apt-get install -y locales \
|
||||||
|
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
||||||
|
&& locale-gen \
|
||||||
|
&& echo "extension=sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-sqlsrv.ini \
|
||||||
|
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-pdo_sqlsrv.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Minio:
|
# Minio:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -403,6 +592,21 @@ RUN if [ ${INSTALL_MC} = true ]; then\
|
||||||
chmod +x /usr/local/bin/mc \
|
chmod +x /usr/local/bin/mc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Image optimizers:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
|
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
|
||||||
|
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||||
|
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
|
||||||
|
if [ ${INSTALL_NODE} = true ]; then \
|
||||||
|
. ~/.bashrc && npm install -g svgo \
|
||||||
|
;fi\
|
||||||
|
;fi
|
||||||
|
|
||||||
|
USER laradock
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Symfony:
|
# Symfony:
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -425,7 +629,80 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
|
||||||
|
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
USER laradock
|
#####################################
|
||||||
|
# PYTHON:
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG INSTALL_PYTHON=false
|
||||||
|
ENV INSTALL_PYTHON ${INSTALL_PYTHON}
|
||||||
|
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||||
|
apt-get update \
|
||||||
|
&& apt-get -y install python python-pip python-dev build-essential \
|
||||||
|
&& pip install --upgrade pip \
|
||||||
|
&& pip install --upgrade virtualenv \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# ImageMagick:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_IMAGEMAGICK=false
|
||||||
|
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
|
||||||
|
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||||
|
apt-get install -y --force-yes imagemagick php-imagick \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Terraform:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_TERRAFORM=false
|
||||||
|
ENV INSTALL_TERRAFORM ${INSTALL_TERRAFORM}
|
||||||
|
RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
|
||||||
|
apt-get update -yqq \
|
||||||
|
&& apt-get -y install sudo wget unzip \
|
||||||
|
&& wget https://releases.hashicorp.com/terraform/0.10.6/terraform_0.10.6_linux_amd64.zip \
|
||||||
|
&& unzip terraform_0.10.6_linux_amd64.zip \
|
||||||
|
&& mv terraform /usr/local/bin \
|
||||||
|
&& rm terraform_0.10.6_linux_amd64.zip \
|
||||||
|
;fi
|
||||||
|
#####################################
|
||||||
|
# pgsql client
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG INSTALL_PG_CLIENT=false
|
||||||
|
ENV INSTALL_PG_CLIENT ${INSTALL_PG_CLIENT}
|
||||||
|
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||||
|
# Install the pgsql clint
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install postgresql-client \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Dusk Dependencies:
|
||||||
|
#####################################
|
||||||
|
USER root
|
||||||
|
ARG CHROME_DRIVER_VERSION=stable
|
||||||
|
ENV CHROME_DRIVER_VERSION ${CHROME_DRIVER_VERSION}
|
||||||
|
ARG INSTALL_DUSK_DEPS=false
|
||||||
|
ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS}
|
||||||
|
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
|
||||||
|
add-apt-repository ppa:ondrej/php \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get -y install zip wget unzip xdg-utils \
|
||||||
|
libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \
|
||||||
|
gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \
|
||||||
|
xfonts-base xfonts-scalable x11-apps \
|
||||||
|
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||||
|
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||||
|
&& apt-get -y -f install \
|
||||||
|
&& dpkg -i --force-depends google-chrome-stable_current_amd64.deb \
|
||||||
|
&& rm google-chrome-stable_current_amd64.deb \
|
||||||
|
&& wget https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip \
|
||||||
|
&& unzip chromedriver_linux64.zip \
|
||||||
|
&& mv chromedriver /usr/local/bin/ \
|
||||||
|
&& rm chromedriver_linux64.zip \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
|
|
|
@ -10,42 +10,94 @@ COL_BLUE=$ESC_SEQ"34;01m"
|
||||||
COL_MAGENTA=$ESC_SEQ"35;01m"
|
COL_MAGENTA=$ESC_SEQ"35;01m"
|
||||||
COL_CYAN=$ESC_SEQ"36;01m"
|
COL_CYAN=$ESC_SEQ"36;01m"
|
||||||
|
|
||||||
|
# Detect which `ls` flavor is in use
|
||||||
|
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
||||||
|
colorflag="--color"
|
||||||
|
export LS_COLORS='no=00:fi=00:di=01;31:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
|
||||||
|
else # macOS `ls`
|
||||||
|
colorflag="-G"
|
||||||
|
export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# List all files colorized in long format
|
||||||
|
#alias l="ls -lF ${colorflag}"
|
||||||
|
### MEGA: I want l and la ti return hisdden files
|
||||||
|
alias l="ls -laF ${colorflag}"
|
||||||
|
|
||||||
|
# List all files colorized in long format, including dot files
|
||||||
|
alias la="ls -laF ${colorflag}"
|
||||||
|
|
||||||
|
# List only directories
|
||||||
|
alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"
|
||||||
|
|
||||||
|
# Always use color output for `ls`
|
||||||
|
alias ls="command ls ${colorflag}"
|
||||||
|
|
||||||
# Commonly Used Aliases
|
# Commonly Used Aliases
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
|
alias ...="cd ../.."
|
||||||
|
alias ....="cd ../../.."
|
||||||
|
alias .....="cd ../../../.."
|
||||||
|
alias ~="cd ~" # `cd` is probably faster to type though
|
||||||
|
alias -- -="cd -"
|
||||||
|
alias home="cd ~"
|
||||||
|
|
||||||
|
alias h="history"
|
||||||
|
alias j="jobs"
|
||||||
|
alias e='exit'
|
||||||
alias c="clear"
|
alias c="clear"
|
||||||
alias cla="clear && ls -l"
|
alias cla="clear && ls -l"
|
||||||
alias cll="clear && ls -la"
|
alias cll="clear && ls -la"
|
||||||
alias cls="clear && ls"
|
alias cls="clear && ls"
|
||||||
alias code="cd /var/www"
|
alias code="cd /var/www"
|
||||||
alias ea="vi ~/aliases"
|
alias ea="vi ~/aliases"
|
||||||
|
|
||||||
|
# Always enable colored `grep` output
|
||||||
|
# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage.
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
|
||||||
|
alias art="php artisan"
|
||||||
|
alias artisan="php artisan"
|
||||||
|
alias cdump="composer dump-autoload -o"
|
||||||
|
alias composer:dump="composer dump-autoload -o"
|
||||||
|
alias db:reset="php artisan migrate:reset && php artisan migrate --seed"
|
||||||
|
alias dusk="php artisan dusk"
|
||||||
|
alias fresh="php artisan migrate:fresh"
|
||||||
|
alias migrate="php artisan migrate"
|
||||||
|
alias refresh="php artisan migrate:refresh"
|
||||||
|
alias rollback="php artisan migrate:rollback"
|
||||||
|
alias seed="php artisan:seed"
|
||||||
|
alias serve="php artisan serve --quiet &"
|
||||||
|
|
||||||
|
alias phpunit="./vendor/bin/phpunit"
|
||||||
|
alias pu="phpunit"
|
||||||
|
alias puf="phpunit --filter"
|
||||||
|
alias pud='phpunit --debug'
|
||||||
|
|
||||||
|
alias cc='codecept'
|
||||||
|
alias ccb='codecept build'
|
||||||
|
alias ccr='codecept run'
|
||||||
|
alias ccu='codecept run unit'
|
||||||
|
alias ccf='codecept run functional'
|
||||||
|
|
||||||
alias g="gulp"
|
alias g="gulp"
|
||||||
alias home="cd ~"
|
|
||||||
alias npm-global="npm list -g --depth 0"
|
alias npm-global="npm list -g --depth 0"
|
||||||
alias ra="reload"
|
alias ra="reload"
|
||||||
alias reload="source ~/.aliases && echo \"$COL_GREEN ==> Aliases Reloaded... $COL_RESET \n \""
|
alias reload="source ~/.aliases && echo \"$COL_GREEN ==> Aliases Reloaded... $COL_RESET \n \""
|
||||||
alias run="npm run"
|
alias run="npm run"
|
||||||
alias tree="xtree"
|
alias tree="xtree"
|
||||||
|
|
||||||
# Laravel / PHP Alisases
|
# Xvfb
|
||||||
alias art="php artisan"
|
alias xvfb="Xvfb -ac :0 -screen 0 1024x768x16 &"
|
||||||
alias artisan="php artisan"
|
|
||||||
alias cdump="composer dump-autoload -o"
|
|
||||||
alias composer:dump="composer dump-autoload -o"
|
|
||||||
alias db:reset="php artisan migrate:reset && php artisan migrate --seed"
|
|
||||||
alias migrate="php artisan migrate"
|
|
||||||
alias seed="php artisan:seed"
|
|
||||||
alias phpunit="./vendor/bin/phpunit"
|
|
||||||
|
|
||||||
|
|
||||||
# requires installation of 'https://www.npmjs.com/package/npms-cli'
|
# requires installation of 'https://www.npmjs.com/package/npms-cli'
|
||||||
alias npms="npms search"
|
alias npms="npms search"
|
||||||
|
|
||||||
# requires installation of 'https://www.npmjs.com/package/package-menu-cli'
|
# requires installation of 'https://www.npmjs.com/package/package-menu-cli'
|
||||||
alias pm="package-menu"
|
alias pm="package-menu"
|
||||||
|
|
||||||
# requires installation of 'https://www.npmjs.com/package/pkg-version-cli'
|
# requires installation of 'https://www.npmjs.com/package/pkg-version-cli'
|
||||||
alias pv="package-version"
|
alias pv="package-version"
|
||||||
|
|
||||||
# requires installation of 'https://github.com/sindresorhus/latest-version-cli'
|
# requires installation of 'https://github.com/sindresorhus/latest-version-cli'
|
||||||
alias lv="latest-version"
|
alias lv="latest-version"
|
||||||
|
|
||||||
|
@ -56,7 +108,6 @@ alias git-revert="git reset --hard && git clean -df"
|
||||||
alias gs="git status"
|
alias gs="git status"
|
||||||
alias whoops="git reset --hard && git clean -df"
|
alias whoops="git reset --hard && git clean -df"
|
||||||
|
|
||||||
|
|
||||||
# Create a new directory and enter it
|
# Create a new directory and enter it
|
||||||
function mkd() {
|
function mkd() {
|
||||||
mkdir -p "$@" && cd "$@"
|
mkdir -p "$@" && cd "$@"
|
||||||
|
@ -69,3 +120,25 @@ function md() {
|
||||||
function xtree {
|
function xtree {
|
||||||
find ${1:-.} -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
find ${1:-.} -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring
|
||||||
|
# the `.git` directory, listing directories first. The output gets piped into
|
||||||
|
# `less` with options to preserve color and line numbers, unless the output is
|
||||||
|
# small enough for one screen.
|
||||||
|
function tre() {
|
||||||
|
tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Determine size of a file or total size of a directory
|
||||||
|
function fs() {
|
||||||
|
if du -b /dev/null > /dev/null 2>&1; then
|
||||||
|
local arg=-sbh;
|
||||||
|
else
|
||||||
|
local arg=-sh;
|
||||||
|
fi
|
||||||
|
if [[ -n "$@" ]]; then
|
||||||
|
du $arg -- "$@";
|
||||||
|
else
|
||||||
|
du $arg .[^.]* ./*;
|
||||||
|
fi;
|
||||||
|
}
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
|
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
|
||||||
|
|
||||||
|
; xdebug.remote_host=dockerhost
|
||||||
|
xdebug.remote_connect_back=1
|
||||||
|
xdebug.remote_port=9000
|
||||||
|
xdebug.idekey=PHPSTORM
|
||||||
|
|
||||||
xdebug.remote_autostart=0
|
xdebug.remote_autostart=0
|
||||||
xdebug.remote_enable=0
|
xdebug.remote_enable=0
|
||||||
xdebug.remote_connect_back=0
|
|
||||||
xdebug.cli_color=0
|
xdebug.cli_color=0
|
||||||
xdebug.profiler_enable=0
|
xdebug.profiler_enable=0
|
||||||
|
xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling"
|
||||||
|
|
||||||
xdebug.remote_handler=dbgp
|
xdebug.remote_handler=dbgp
|
||||||
xdebug.remote_mode=req
|
xdebug.remote_mode=req
|
||||||
|
|
||||||
xdebug.remote_port=9000
|
xdebug.var_display_max_children=-1
|
||||||
xdebug.remote_host=dockerhost
|
xdebug.var_display_max_data=-1
|
||||||
xdebug.idekey=PHPSTORM
|
xdebug.var_display_max_depth=-1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue