Compare commits
196 Commits
Author | SHA1 | Date | |
---|---|---|---|
36c78369d5 | |||
acac6eb229 | |||
04f071555c | |||
03ff791e17 | |||
7c4f6dd7a9 | |||
f44a8e0ca0 | |||
ce7a29c662 | |||
bbff18c631 | |||
e07c128063 | |||
163eb1f73a | |||
30c8afafa2 | |||
3e771dbcfc | |||
a1bda23cd9 | |||
e6d866b8a6 | |||
35ffd02b44 | |||
d03ead34a2 | |||
d8c36ab860 | |||
2689638d7d | |||
fa7d3c239c | |||
22032974c9 | |||
4480962922 | |||
cc81e57206 | |||
5c41a4f3e9 | |||
796b46cf5a | |||
d7765a7b10 | |||
156d124db0 | |||
afdf2661bd | |||
a1af01b137 | |||
1519c80036 | |||
441146b325 | |||
0ed5487ed7 | |||
ca9d244396 | |||
cf46b87a01 | |||
0af2115658 | |||
c1e8e955a1 | |||
0ffea858d6 | |||
549094d7d2 | |||
7219b3543a | |||
1dac382827 | |||
876336bc1a | |||
538b6aa0cd | |||
c886831613 | |||
9cfe5c6156 | |||
db02fe7570 | |||
436df887c9 | |||
919cde3a76 | |||
784aab2043 | |||
d5d9073863 | |||
6a3b3fac2d | |||
61576c0b1b | |||
70c1be4168 | |||
e101e4d5b2 | |||
4658820437 | |||
0bbfb2d228 | |||
86a4108ef4 | |||
20c85904c5 | |||
aaef73c84d | |||
876935452e | |||
00df369e96 | |||
902198ab05 | |||
2e2cb6df22 | |||
39469e1404 | |||
947a791ad2 | |||
aa84dd8616 | |||
b788a8bbfd | |||
89051de67d | |||
1b865dd153 | |||
8180804ae0 | |||
303dadf33d | |||
764e484599 | |||
e92f08e323 | |||
1acbebc2a3 | |||
b2ab970d04 | |||
679d2b0aba | |||
fbc2afee71 | |||
1962327de1 | |||
d8b2b8c233 | |||
0f65c60a89 | |||
8624335f61 | |||
7ef36daaba | |||
4ce25e95b4 | |||
20b0181b6d | |||
dc234b9b28 | |||
29483bab8c | |||
85c57a0b6f | |||
2f996450e5 | |||
1823060c4b | |||
6fa2b75bb7 | |||
2ec23122e7 | |||
a1e01ac19b | |||
eccc149f45 | |||
9cb7624da7 | |||
cd1c56c1e2 | |||
9d42ea6b9d | |||
b0bfa5f1d3 | |||
dcf6b6d9ac | |||
1d9cbd7c75 | |||
fd56c4dcda | |||
0351cf531b | |||
09e998b723 | |||
06d0105514 | |||
0cbc51bf72 | |||
08dfc9f816 | |||
b71f50bf83 | |||
7d1dc66f77 | |||
f3c934222f | |||
a90865d67c | |||
a0a5c85a54 | |||
a807caa30a | |||
bc27e96337 | |||
11912055ec | |||
3509473b89 | |||
5521f71428 | |||
339d47f303 | |||
600a6154b4 | |||
4673ba7b31 | |||
154249a08f | |||
5bffd43b55 | |||
0e9d044c6f | |||
21d203da73 | |||
a3cbfd71f5 | |||
33234fd3b5 | |||
f47e40b262 | |||
7199ae5a34 | |||
6caa4c5fb9 | |||
3fceba0709 | |||
75b3fa499e | |||
999118b674 | |||
4b2c440146 | |||
a4d3f9bd77 | |||
65444d39b6 | |||
5016e88515 | |||
e8eb97b398 | |||
66c61d9a72 | |||
d8f95bac2a | |||
ad316bab50 | |||
6e43dd804d | |||
ba1a83b40b | |||
34ad8acdbf | |||
d5ea58eb6e | |||
567756475d | |||
ad21cd225f | |||
f2f5aeabd6 | |||
0f4a417f4e | |||
42a960338b | |||
2e75c25c7f | |||
beec32498e | |||
573b8e0afd | |||
409f91662f | |||
185ba60a09 | |||
a03ce23bf5 | |||
fc8736773c | |||
d5efd5309e | |||
da3a7226bd | |||
cc20ac2421 | |||
402383e7b7 | |||
9250326664 | |||
51d253db21 | |||
69de0668e9 | |||
472df4d194 | |||
62b716f469 | |||
10ba847415 | |||
a0595491a2 | |||
7c88c33b29 | |||
808bd72d13 | |||
07410e80cf | |||
d1170f51c8 | |||
8158b6f50e | |||
97adef735a | |||
6e6284d00f | |||
890faa2f3c | |||
f6f37ec020 | |||
20464d1bd2 | |||
a5813de5bf | |||
aee1adb0a1 | |||
dd322a0e71 | |||
99c2c846ff | |||
d08177d2c2 | |||
b990af3353 | |||
b2c09f6b15 | |||
9e5fdda294 | |||
77bea30cb0 | |||
dac336e6a1 | |||
d142500216 | |||
ad1509dd62 | |||
9ab84c5174 | |||
6b6e2d5f86 | |||
3ad17eca0a | |||
f54e6baf02 | |||
59f3b574da | |||
0c41fceae1 | |||
76b95752bf | |||
101986c76f | |||
add78a19f4 | |||
545d50105c | |||
2a74f1433c |
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -2,6 +2,6 @@
|
||||
|
||||
##### 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 :)
|
||||
- [ ] 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 :)
|
||||
|
2
.github/README.md
vendored
2
.github/README.md
vendored
@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="https://s19.postimg.org/jblfytw9f/laradock-logo.jpg" alt="Laradock Logo"/>
|
||||
<img src="/.github/home-page-images/laradock-logo.jpg?raw=true" alt="Laradock Logo"/>
|
||||
</p>
|
||||
|
||||
<p align="center">A Docker PHP development environment that facilitates running PHP Apps on Docker</p>
|
||||
|
BIN
.github/home-page-images/laradock-logo.jpg
vendored
Normal file
BIN
.github/home-page-images/laradock-logo.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 287 KiB |
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,3 +5,6 @@
|
||||
/.project
|
||||
.docker-sync
|
||||
/jenkins/jenkins_home
|
||||
/nginx/ssl/*.crt
|
||||
/nginx/ssl/*.key
|
||||
/nginx/ssl/*.csr
|
||||
|
@ -13,50 +13,50 @@ before_script:
|
||||
- cat .env
|
||||
- env | sort
|
||||
|
||||
build:56:php-fpm:
|
||||
build:5.6:php-fpm:
|
||||
variables:
|
||||
PHP_VERSION: "56"
|
||||
PHP_VERSION: "5.6"
|
||||
script:
|
||||
- docker-compose build php-fpm
|
||||
|
||||
build:70:php-fpm:
|
||||
build:7.0:php-fpm:
|
||||
variables:
|
||||
PHP_VERSION: "70"
|
||||
PHP_VERSION: "7.0"
|
||||
script:
|
||||
- docker-compose build php-fpm
|
||||
|
||||
build:71:php-fpm:
|
||||
build:7.1:php-fpm:
|
||||
variables:
|
||||
PHP_VERSION: "71"
|
||||
PHP_VERSION: "7.1"
|
||||
script:
|
||||
- docker-compose build php-fpm
|
||||
|
||||
build:72:php-fpm:
|
||||
build:7.2:php-fpm:
|
||||
variables:
|
||||
PHP_VERSION: "72"
|
||||
PHP_VERSION: "7.2"
|
||||
script:
|
||||
- docker-compose build php-fpm
|
||||
|
||||
build:56:workspace:
|
||||
build:5.6:workspace:
|
||||
variables:
|
||||
PHP_VERSION: "56"
|
||||
PHP_VERSION: "5.6"
|
||||
script:
|
||||
- docker-compose build workspace
|
||||
|
||||
build:70:workspace:
|
||||
build:7.0:workspace:
|
||||
variables:
|
||||
PHP_VERSION: "70"
|
||||
PHP_VERSION: "7.0"
|
||||
script:
|
||||
- docker-compose build workspace
|
||||
|
||||
build:71:workspace:
|
||||
build:7.1:workspace:
|
||||
variables:
|
||||
PHP_VERSION: "71"
|
||||
PHP_VERSION: "7.1"
|
||||
script:
|
||||
- docker-compose build workspace
|
||||
|
||||
build:72:workspace:
|
||||
build:7.2:workspace:
|
||||
variables:
|
||||
PHP_VERSION: "72"
|
||||
PHP_VERSION: "7.2"
|
||||
script:
|
||||
- docker-compose build workspace
|
||||
|
26
.travis.yml
26
.travis.yml
@ -7,26 +7,26 @@ env:
|
||||
matrix:
|
||||
- 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=72 BUILD_SERVICE=workspace
|
||||
- PHP_VERSION=5.6 BUILD_SERVICE=workspace
|
||||
- PHP_VERSION=7.0 BUILD_SERVICE=workspace
|
||||
- PHP_VERSION=7.1 BUILD_SERVICE=workspace
|
||||
- PHP_VERSION=7.2 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=72 BUILD_SERVICE=php-fpm
|
||||
- PHP_VERSION=5.6 BUILD_SERVICE=php-fpm
|
||||
- PHP_VERSION=7.0 BUILD_SERVICE=php-fpm
|
||||
- PHP_VERSION=7.1 BUILD_SERVICE=php-fpm
|
||||
- PHP_VERSION=7.2 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=72 BUILD_SERVICE=php-worker
|
||||
# - PHP_VERSION=5.6 BUILD_SERVICE=php-worker
|
||||
- PHP_VERSION=7.0 BUILD_SERVICE=php-worker
|
||||
- PHP_VERSION=7.1 BUILD_SERVICE=php-worker
|
||||
- PHP_VERSION=7.2 BUILD_SERVICE=php-worker
|
||||
|
||||
- PHP_VERSION=NA BUILD_SERVICE=solr
|
||||
- PHP_VERSION=NA BUILD_SERVICE="mssql rethinkdb 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="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"
|
||||
|
@ -1,4 +1,4 @@
|
||||
baseurl = "http://laradock.io/"
|
||||
baseurl = "https://laradock.io/"
|
||||
languageCode = "en-us"
|
||||
publishDir = "../docs"
|
||||
title = "Laradock"
|
||||
|
@ -73,7 +73,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
|
||||
|
||||
* Add the environment variables to the `env-example` if you have any.
|
||||
|
||||
* **MOST IMPORTANTLY** updated the `Documentation`, add as much information.
|
||||
* **MOST IMPORTANTLY** update the `Documentation`, add as much information.
|
||||
|
||||
* Submit a Pull Request, to the `master` branch.
|
||||
|
||||
@ -100,7 +100,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
|
||||
|
||||
* Search for the image in the [Docker Hub](https://hub.docker.com/search/) and find the source..
|
||||
|
||||
*Most of the image in Laradock are offical images, these projects live in other repositories and maintainer by other orgnizations.*
|
||||
*Most of the image in Laradock are offical images, these projects live in other repositories and maintainer by other organizations.*
|
||||
|
||||
**Note:** Laradock has two base images for (`Workspace` and `php-fpm`, mainly made to speed up the build time on your machine.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ weight: 2
|
||||
## Requirements
|
||||
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
|
||||
- [Docker](https://www.docker.com/products/docker/) `>= 17.12`
|
||||
|
||||
|
||||
|
||||
@ -81,10 +81,10 @@ We'll need to do step 1 of the [Usage](#Usage) section now to make this happen.
|
||||
cp env-example .env
|
||||
```
|
||||
|
||||
At the top, change the `APPLICATION` variable to your project path.
|
||||
At the top, change the `APP_CODE_PATH_HOST` variable to your project path.
|
||||
|
||||
```
|
||||
APPLICATION=../project-z/
|
||||
APP_CODE_PATH_HOST=../project-z/
|
||||
```
|
||||
|
||||
Make sure to replace `project-z` with your project folder name.
|
||||
@ -94,7 +94,7 @@ Make sure to replace `project-z` with your project folder name.
|
||||
|
||||
<a name="B"></a>
|
||||
### B) Setup for Multiple Projects:
|
||||
> (Follow these steps if you want a single Docker environment for all your project)
|
||||
> (Follow these steps if you want a single Docker environment for all your projects)
|
||||
|
||||
1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
|
||||
|
||||
@ -143,7 +143,7 @@ If you use Chrome 63 or above for development, don't use `.dev`. [Why?](https://
|
||||
If you are using **Docker Toolbox** (VM), do one of the following:
|
||||
|
||||
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
|
||||
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
|
||||
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/LaraDock-ToolBox) branch. *(outdated)*
|
||||
|
||||
<br>
|
||||
|
||||
@ -161,11 +161,13 @@ We recommend using a Docker version which is newer than 1.13.
|
||||
cp env-example .env
|
||||
```
|
||||
|
||||
You can edit the `.env` file to choose which software's you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables are been used.
|
||||
You can edit the `.env` file to choose which software'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 being 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`
|
||||
By default the containers that will be created have the current directory name as suffix (e.g. `laradock_workspace_1`). This can cause mixture of data inside the container volumes if you use laradock in multiple projects. In this case, either read the guide for [multiple projects](#B) or change the variable `COMPOSE_PROJECT_NAME` to something unique like your project name.
|
||||
|
||||
2 - Build the environment and run it using `docker-compose`
|
||||
|
||||
In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:
|
||||
|
||||
@ -173,7 +175,7 @@ In this example we'll see how to run NGINX (web server) and MySQL (database engi
|
||||
docker-compose up -d nginx mysql
|
||||
```
|
||||
|
||||
**Note**: The web servers `nginx`, `apache`.. all depend on `php-fpm`, means if you just run, them they will automatically run the `php-fpm` for you, so no need to specify them in the `up` command. If you don't see them running then you may need run them as follow: `docker-compose up -d nginx php-fpm mysql...`.
|
||||
**Note**: All the web server containers `nginx`, `apache` ..etc depends on `php-fpm`, which means if you run any of them, they will automatically launch the `php-fpm` container for you, so no need to explicitly specify it in the `up` command. If you have to do so, you may need to run them as follows: `docker-compose up -d nginx php-fpm mysql`.
|
||||
|
||||
|
||||
You can select your own combination of containers from [this list](http://laradock.io/introduction/#supported-software-images).
|
||||
@ -203,7 +205,7 @@ docker-compose exec --user=laradock workspace bash
|
||||
*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
|
||||
|
||||
<br>
|
||||
4 - Update your project configurations to use the database host
|
||||
4 - Update your project configuration to use the database host
|
||||
|
||||
Open your PHP project's `.env` file or whichever configuration file you are reading from, and set the database host `DB_HOST` to `mysql`:
|
||||
|
||||
|
@ -197,7 +197,7 @@ This is needed Prior to Creating Let's Encypt
|
||||
## Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt
|
||||
|
||||
```
|
||||
$root@server:~/laravel/laradock/caddy# docker-compose up caddy
|
||||
$root@server:~/laravel/laradock# docker-compose up caddy
|
||||
```
|
||||
|
||||
You'll be prompt here to enter your email... you may enter it or not
|
||||
@ -218,8 +218,8 @@ After it finishes, press `Ctrl` + `C` to exit.
|
||||
## Stop All Containers and ReRun Caddy and Other Containers on Background
|
||||
|
||||
```
|
||||
$root@server:~/laravel/laradock/caddy# docker-compose down
|
||||
$root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
|
||||
$root@server:~/laravel/laradock# docker-compose down
|
||||
$root@server:~/laravel/laradock# docker-compose up -d mysql caddy
|
||||
```
|
||||
|
||||
View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)
|
||||
@ -418,7 +418,7 @@ laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222-
|
||||
<a name="enablePhpXdebug"></a>
|
||||
## 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:
|
||||
|
||||
```
|
||||
@ -430,7 +430,7 @@ Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
||||
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
|
||||
`php-fpm` is started and listening for debug info on port 9000.
|
||||
@ -516,9 +516,9 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
|
||||
<a name="UsagePHPStormDebugSite"></a>
|
||||
### Debug WebSite
|
||||
- In case xDebug is disabled, from the `laradock` folder run:
|
||||
`.php-fpm/xdebug start`.
|
||||
`./php-fpm/xdebug start`.
|
||||
- To switch xdebug off, run:
|
||||
`.php-fpm/xdebug stop`
|
||||
`./php-fpm/xdebug stop`
|
||||
|
||||
- Start Remote Debugging
|
||||
- 
|
||||
|
@ -58,7 +58,7 @@ That's it! enjoy :)
|
||||
<a name="features"></a>
|
||||
## Features
|
||||
|
||||
- Easy switch between PHP versions: 7.1, 7.0, 5.6...
|
||||
- Easy switch between PHP versions: 7.2, 7.1, 5.6...
|
||||
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
|
||||
- Run your own combination of software: Memcached, HHVM, Beanstalkd...
|
||||
- Every software runs on a separate container: PHP-FPM, NGINX, PHP-CLI...
|
||||
@ -97,7 +97,7 @@ Beanstalkd - RabbitMQ - PHP Worker
|
||||
- **Queueing Management:**
|
||||
Beanstalkd Console - RabbitMQ Console
|
||||
- **Random Tools:**
|
||||
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - Laravel Echo...
|
||||
Mailu - HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Gitlab - Mailhog - MailDev - Minio - Varnish - Swoole - NetData - Portainer - Laravel Echo - Phalcon...
|
||||
|
||||
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.
|
||||
|
@ -25,18 +25,21 @@
|
||||
<article class="article">
|
||||
<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>
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
<!-- Wrapper arround google ads for seedanddew -->
|
||||
<div class='snd-ad'>
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
<!-- 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>
|
||||
<!-- ------------------------------------------------------------------------- -->
|
||||
</div>
|
||||
|
||||
{{ range where .Site.Pages "Type" "index" }}
|
||||
<h1>{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}</h1>
|
||||
|
@ -70,6 +70,27 @@
|
||||
{{ end }}
|
||||
<script src="{{ "javascripts/modernizr.js" | absURL }}"></script>
|
||||
|
||||
<script>
|
||||
// ------------------------------------------------------------
|
||||
// seedanddew.com integration
|
||||
var SeedAndDewConfig = {};
|
||||
(function() {
|
||||
SeedAndDewConfig['adClass'] = "snd-ad";
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
SeedAndDewConfig['projectId'] = 'd69f3ea2-1e30-44c7-bd2a-87686c0136e6';
|
||||
SeedAndDewConfig['loadStartTime'] = performance.now();
|
||||
SeedAndDewConfig['apiVersion'] = '2018-05-28'
|
||||
SeedAndDewConfig['sessionId'] = Math.random().toString(36).substring(2, 15);
|
||||
var snd = document.createElement('script');
|
||||
snd.type = 'text/javascript';
|
||||
snd.async = true;
|
||||
snd.src = 'https://www.seedanddew.com/static/embed.min.js';
|
||||
(document.getElementsByTagName('head')[0] ||
|
||||
document.getElementsByTagName('body')[0]).appendChild(snd);
|
||||
})();
|
||||
// ------------------------------------------------------------
|
||||
</script>
|
||||
|
||||
{{ with .RSSLink }}
|
||||
<link href="{{ . }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
<link href="{{ . }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
|
@ -1,7 +1,4 @@
|
||||
FROM adminer:4.3.0
|
||||
|
||||
# Version 4.3.1 contains PostgreSQL login errors. See docs.
|
||||
# See https://sourceforge.net/p/adminer/bugs-and-features/548/
|
||||
FROM adminer:4
|
||||
|
||||
LABEL maintainer="Patrick Artounian <partounian@gmail.com>"
|
||||
|
||||
|
@ -1,17 +1,27 @@
|
||||
FROM zuohuadong/caddy:alpine
|
||||
FROM golang:alpine
|
||||
|
||||
LABEL maintainer="Huadong Zuo <admin@zuohuadong.cn>"
|
||||
|
||||
RUN apk add --no-cache \
|
||||
openssh \
|
||||
git \
|
||||
build-base && \
|
||||
go get github.com/abiosoft/caddyplug/caddyplug \
|
||||
&& caddyplug install-caddy \
|
||||
apk del build-base
|
||||
|
||||
ARG plugins="cors"
|
||||
|
||||
## ARG plugins="cors cgi cloudflare azure linode"
|
||||
|
||||
|
||||
RUN caddyplug install ${plugins}
|
||||
|
||||
RUN apk add --no-cache inotify-tools \
|
||||
&& echo -e "#!/bin/sh\nwhile inotifywait -e modify /etc/caddy; do\n\tpkill caddy\ndone " >> /start.sh \
|
||||
&& chmod +x /start.sh
|
||||
|
||||
EXPOSE 80 443 2015
|
||||
EXPOSE 80 443
|
||||
|
||||
WORKDIR /var/www/public
|
||||
|
||||
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]
|
||||
CMD ["sh","-c","/start.sh & /usr/bin/caddy -conf /etc/caddy/Caddyfile -agree"]
|
||||
|
@ -44,3 +44,8 @@ laradock2.demo:80 {
|
||||
#proxy domain.com
|
||||
#cors
|
||||
}
|
||||
|
||||
laradock3.demo:80 {
|
||||
import authlist.conf
|
||||
root /var/www/public
|
||||
}
|
1
caddy/caddy/authlist.conf
Normal file
1
caddy/caddy/authlist.conf
Normal file
@ -0,0 +1 @@
|
||||
basicauth / laradock laradock
|
@ -2,15 +2,6 @@ version: '3'
|
||||
|
||||
services:
|
||||
|
||||
### Applications Code Container #############################
|
||||
|
||||
# applications:
|
||||
# image: tianon/true
|
||||
# volumes:
|
||||
# - applications-sync:/var/www:nocopy # nocopy is required
|
||||
|
||||
### Volumes Setup #############################################
|
||||
|
||||
volumes:
|
||||
applications-sync:
|
||||
external:
|
||||
|
@ -39,6 +39,8 @@ volumes:
|
||||
driver: ${VOLUMES_DRIVER}
|
||||
elasticsearch:
|
||||
driver: ${VOLUMES_DRIVER}
|
||||
mosquitto:
|
||||
driver: ${VOLUMES_DRIVER}
|
||||
|
||||
services:
|
||||
|
||||
@ -47,8 +49,14 @@ services:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- LARADOCK_PHP_VERSION=${PHP_VERSION}
|
||||
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
|
||||
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
|
||||
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
|
||||
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
|
||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||
- INSTALL_SSH2=${WORKSPACE_INSTALL_SSH2}
|
||||
- INSTALL_GMP=${WORKSPACE_INSTALL_GMP}
|
||||
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
|
||||
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
|
||||
- INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}
|
||||
@ -59,9 +67,13 @@ services:
|
||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
|
||||
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
||||
- INSTALL_NPM_GULP=${WORKSPACE_INSTALL_NPM_GULP}
|
||||
- INSTALL_NPM_BOWER=${WORKSPACE_INSTALL_NPM_BOWER}
|
||||
- INSTALL_NPM_VUE_CLI=${WORKSPACE_INSTALL_NPM_VUE_CLI}
|
||||
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
|
||||
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
|
||||
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
|
||||
- AEROSPIKE_PHP_REPOSITORY=${AEROSPIKE_PHP_REPOSITORY}
|
||||
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
|
||||
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
||||
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
|
||||
@ -79,16 +91,20 @@ services:
|
||||
- INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}
|
||||
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
|
||||
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
|
||||
- INSTALL_PHALCON=${WORKSPACE_INSTALL_PHALCON}
|
||||
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
|
||||
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
|
||||
- INSTALL_IONCUBE=${WORKSPACE_INSTALL_IONCUBE}
|
||||
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
|
||||
- PUID=${WORKSPACE_PUID}
|
||||
- PGID=${WORKSPACE_PGID}
|
||||
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
|
||||
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
||||
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
|
||||
- DRUSH_VERSION=${WORKSPACE_DRUSH_VERSION}
|
||||
- TZ=${WORKSPACE_TIMEZONE}
|
||||
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
|
||||
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
extra_hosts:
|
||||
@ -98,17 +114,24 @@ services:
|
||||
tty: true
|
||||
environment:
|
||||
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
|
||||
- DOCKER_HOST=tcp://docker-in-docker:2375
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
links:
|
||||
- docker-in-docker
|
||||
|
||||
### PHP-FPM ##############################################
|
||||
php-fpm:
|
||||
build:
|
||||
context: ./php-fpm
|
||||
args:
|
||||
- LARADOCK_PHP_VERSION=${PHP_VERSION}
|
||||
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
|
||||
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
|
||||
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
|
||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||
- INSTALL_SSH2=${PHP_FPM_INSTALL_SSH2}
|
||||
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
|
||||
- INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP}
|
||||
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
|
||||
@ -122,17 +145,22 @@ services:
|
||||
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
|
||||
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
|
||||
- INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE}
|
||||
- AEROSPIKE_PHP_REPOSITORY=${AEROSPIKE_PHP_REPOSITORY}
|
||||
- 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_INTL=${PHP_FPM_INSTALL_INTL}
|
||||
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
|
||||
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
|
||||
- INSTALL_PHALCON=${PHP_FPM_INSTALL_PHALCON}
|
||||
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
|
||||
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
|
||||
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
- INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR}
|
||||
- INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME}
|
||||
- INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
|
||||
- INSTALL_APCU=${PHP_FPM_INSTALL_APCU}
|
||||
- INSTALL_YAML=${PHP_FPM_INSTALL_YAML}
|
||||
volumes:
|
||||
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
@ -142,16 +170,29 @@ services:
|
||||
- "dockerhost:${DOCKER_HOST_IP}"
|
||||
environment:
|
||||
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
|
||||
- DOCKER_HOST=tcp://docker-in-docker:2375
|
||||
- FAKETIME=${PHP_FPM_FAKETIME}
|
||||
depends_on:
|
||||
- workspace
|
||||
networks:
|
||||
- backend
|
||||
links:
|
||||
- docker-in-docker
|
||||
|
||||
### PHP Worker ############################################
|
||||
php-worker:
|
||||
build:
|
||||
context: ./php-worker
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
args:
|
||||
- PHP_VERSION=${PHP_VERSION}
|
||||
- PHALCON_VERSION=${PHALCON_VERSION}
|
||||
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
|
||||
- INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH}
|
||||
- INSTALL_PHALCON=${PHP_WORKER_INSTALL_PHALCON}
|
||||
- INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP}
|
||||
- INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE}
|
||||
- PUID=${PHP_WORKER_PUID}
|
||||
- PGID=${PHP_WORKER_PGID}
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
- ./php-worker/supervisord.d:/etc/supervisord.d
|
||||
@ -161,6 +202,24 @@ services:
|
||||
- "dockerhost:${DOCKER_HOST_IP}"
|
||||
networks:
|
||||
- backend
|
||||
### Laravel Horizon ############################################
|
||||
laravel-horizon:
|
||||
build:
|
||||
context: ./laravel-horizon
|
||||
args:
|
||||
- PHP_VERSION=${PHP_VERSION}
|
||||
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
||||
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
||||
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
- ./laravel-horizon/supervisord.d:/etc/supervisord.d
|
||||
depends_on:
|
||||
- workspace
|
||||
extra_hosts:
|
||||
- "dockerhost:${DOCKER_HOST_IP}"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### NGINX Server #########################################
|
||||
nginx:
|
||||
@ -169,10 +228,12 @@ services:
|
||||
args:
|
||||
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
|
||||
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
|
||||
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
|
||||
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
|
||||
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
|
||||
ports:
|
||||
- "${NGINX_HOST_HTTP_PORT}:80"
|
||||
- "${NGINX_HOST_HTTPS_PORT}:443"
|
||||
@ -316,6 +377,7 @@ services:
|
||||
build: ./postgres
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data
|
||||
- ${POSTGRES_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||
ports:
|
||||
- "${POSTGRES_PORT}:5432"
|
||||
environment:
|
||||
@ -382,6 +444,17 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### ZooKeeper #########################################
|
||||
zookeeper:
|
||||
build: ./zookeeper
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/zookeeper/data:/data
|
||||
- ${DATA_PATH_HOST}/zookeeper/datalog:/datalog
|
||||
ports:
|
||||
- "${ZOOKEEPER_PORT}:2181"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Aerospike ##########################################
|
||||
aerospike:
|
||||
build: ./aerospike
|
||||
@ -450,7 +523,7 @@ services:
|
||||
build: ./caddy
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
- ${CADDY_CUSTOM_CADDYFILE}:/etc/Caddyfile
|
||||
- ${CADDY_CONFIG_PATH}:/etc/caddy
|
||||
- ${CADDY_HOST_LOG_PATH}:/var/log/caddy
|
||||
- ${DATA_PATH_HOST}:/root/.caddy
|
||||
ports:
|
||||
@ -505,7 +578,6 @@ services:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
|
||||
### ElasticSearch ########################################
|
||||
elasticsearch:
|
||||
build: ./elasticsearch
|
||||
@ -528,7 +600,6 @@ services:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
|
||||
### Kibana ##############################################
|
||||
kibana:
|
||||
build: ./kibana
|
||||
@ -546,7 +617,7 @@ services:
|
||||
context: ./certbot
|
||||
volumes:
|
||||
- ./data/certbot/certs/:/var/certs
|
||||
- ./certbot/letsencrypt/:${APP_CODE_PATH_CONTAINER}/letsencrypt
|
||||
- ./certbot/letsencrypt/:/var/www/letsencrypt
|
||||
environment:
|
||||
- CN="fake.domain.com"
|
||||
- EMAIL="fake.email@gmail.com"
|
||||
@ -677,6 +748,7 @@ services:
|
||||
args:
|
||||
- SOLR_VERSION=${SOLR_VERSION}
|
||||
- SOLR_DATAIMPORTHANDLER_MYSQL=${SOLR_DATAIMPORTHANDLER_MYSQL}
|
||||
- SOLR_DATAIMPORTHANDLER_MSSQL=${SOLR_DATAIMPORTHANDLER_MSSQL}
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/solr:/opt/solr/server/solr/mycores
|
||||
ports:
|
||||
@ -684,6 +756,122 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Thumbor #########################################
|
||||
thumbor:
|
||||
build: ./thumbor
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/thumbor/data:/data
|
||||
- ${DATA_PATH_HOST}/thumbor/data:/logs
|
||||
ports:
|
||||
- "${THUMBOR_PORT}:8000"
|
||||
environment:
|
||||
- THUMBOR_LOG_FORMAT=${THUMBOR_LOG_FORMAT}
|
||||
- THUMBOR_LOG_DATE_FORMAT=${THUMBOR_LOG_DATE_FORMAT}
|
||||
- MAX_WIDTH=${MAX_WIDTH}
|
||||
- MAX_HEIGHT=${MAX_HEIGHT}
|
||||
- MIN_WIDTH=${MIN_WIDTH}
|
||||
- MIN_HEIGHT=${MIN_HEIGHT}
|
||||
- ALLOWED_SOURCES=${ALLOWED_SOURCES}
|
||||
- QUALITY=${QUALITY}
|
||||
- WEBP_QUALITY=${WEBP_QUALITY}
|
||||
- PNG_COMPRESSION_LEVEL=${PNG_COMPRESSION_LEVEL}
|
||||
- AUTO_WEBP=${AUTO_WEBP}
|
||||
- MAX_AGE=${MAX_AGE}
|
||||
- MAX_AGE_TEMP_IMAGE=${MAX_AGE_TEMP_IMAGE}
|
||||
- RESPECT_ORIENTATION=${RESPECT_ORIENTATION}
|
||||
- IGNORE_SMART_ERRORS=${IGNORE_SMART_ERRORS}
|
||||
- PRESERVE_EXIF_INFO=${PRESERVE_EXIF_INFO}
|
||||
- ALLOW_ANIMATED_GIFS=${ALLOW_ANIMATED_GIFS}
|
||||
- USE_GIFSICLE_ENGINE=${USE_GIFSICLE_ENGINE}
|
||||
- USE_BLACKLIST=${USE_BLACKLIST}
|
||||
- LOADER=${LOADER}
|
||||
- STORAGE=${STORAGE}
|
||||
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
||||
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
||||
- RESULT_STORAGE=${RESULT_STORAGE}
|
||||
- ENGINE=${ENGINE}
|
||||
- SECURITY_KEY=${SECURITY_KEY}
|
||||
- ALLOW_UNSAFE_URL=${ALLOW_UNSAFE_URL}
|
||||
- ALLOW_OLD_URLS=${ALLOW_OLD_URLS}
|
||||
- FILE_LOADER_ROOT_PATH=${FILE_LOADER_ROOT_PATH}
|
||||
- HTTP_LOADER_CONNECT_TIMEOUT=${HTTP_LOADER_CONNECT_TIMEOUT}
|
||||
- HTTP_LOADER_REQUEST_TIMEOUT=${HTTP_LOADER_REQUEST_TIMEOUT}
|
||||
- HTTP_LOADER_FOLLOW_REDIRECTS=${HTTP_LOADER_FOLLOW_REDIRECTS}
|
||||
- HTTP_LOADER_MAX_REDIRECTS=${HTTP_LOADER_MAX_REDIRECTS}
|
||||
- HTTP_LOADER_FORWARD_USER_AGENT=${HTTP_LOADER_FORWARD_USER_AGENT}
|
||||
- HTTP_LOADER_DEFAULT_USER_AGENT=${HTTP_LOADER_DEFAULT_USER_AGENT}
|
||||
- HTTP_LOADER_PROXY_HOST=${HTTP_LOADER_PROXY_HOST}
|
||||
- HTTP_LOADER_PROXY_PORT=${HTTP_LOADER_PROXY_PORT}
|
||||
- HTTP_LOADER_PROXY_USERNAME=${HTTP_LOADER_PROXY_USERNAME}
|
||||
- HTTP_LOADER_PROXY_PASSWORD=${HTTP_LOADER_PROXY_PASSWORD}
|
||||
- HTTP_LOADER_CA_CERTS=${HTTP_LOADER_CA_CERTS}
|
||||
- HTTP_LOADER_VALIDATE_CERTS=${HTTP_LOADER_VALIDATE_CERTS}
|
||||
- HTTP_LOADER_CLIENT_KEY=${HTTP_LOADER_CLIENT_KEY}
|
||||
- HTTP_LOADER_CLIENT_CERT=${HTTP_LOADER_CLIENT_CERT}
|
||||
- HTTP_LOADER_CURL_ASYNC_HTTP_CLIENT=${HTTP_LOADER_CURL_ASYNC_HTTP_CLIENT}
|
||||
- STORAGE_EXPIRATION_SECONDS=${STORAGE_EXPIRATION_SECONDS}
|
||||
- STORES_CRYPTO_KEY_FOR_EACH_IMAGE=${STORES_CRYPTO_KEY_FOR_EACH_IMAGE}
|
||||
- FILE_STORAGE_ROOT_PATH=${FILE_STORAGE_ROOT_PATH}
|
||||
- UPLOAD_MAX_SIZE=${UPLOAD_MAX_SIZE}
|
||||
- UPLOAD_ENABLED=${UPLOAD_ENABLED}
|
||||
- UPLOAD_PHOTO_STORAGE=${UPLOAD_PHOTO_STORAGE}
|
||||
- UPLOAD_DELETE_ALLOWED=${UPLOAD_DELETE_ALLOWED}
|
||||
- UPLOAD_PUT_ALLOWED=${UPLOAD_PUT_ALLOWED}
|
||||
- UPLOAD_DEFAULT_FILENAME=${UPLOAD_DEFAULT_FILENAME}
|
||||
- MONGO_STORAGE_SERVER_HOST=${MONGO_STORAGE_SERVER_HOST}
|
||||
- MONGO_STORAGE_SERVER_PORT=${MONGO_STORAGE_SERVER_PORT}
|
||||
- MONGO_STORAGE_SERVER_DB=${MONGO_STORAGE_SERVER_DB}
|
||||
- MONGO_STORAGE_SERVER_COLLECTION=${MONGO_STORAGE_SERVER_COLLECTION}
|
||||
- REDIS_STORAGE_SERVER_HOST=${REDIS_STORAGE_SERVER_HOST}
|
||||
- REDIS_STORAGE_SERVER_PORT=${REDIS_STORAGE_SERVER_PORT}
|
||||
- REDIS_STORAGE_SERVER_DB=${REDIS_STORAGE_SERVER_DB}
|
||||
- REDIS_STORAGE_SERVER_PASSWORD=${REDIS_STORAGE_SERVER_PASSWORD}
|
||||
- REDIS_RESULT_STORAGE_SERVER_HOST=${REDIS_RESULT_STORAGE_SERVER_HOST}
|
||||
- REDIS_RESULT_STORAGE_SERVER_PORT=${REDIS_RESULT_STORAGE_SERVER_PORT}
|
||||
- REDIS_RESULT_STORAGE_SERVER_DB=${REDIS_RESULT_STORAGE_SERVER_DB}
|
||||
- REDIS_RESULT_STORAGE_SERVER_PASSWORD=${REDIS_RESULT_STORAGE_SERVER_PASSWORD}
|
||||
- MEMCACHE_STORAGE_SERVERS=${MEMCACHE_STORAGE_SERVERS}
|
||||
- MIXED_STORAGE_FILE_STORAGE=${MIXED_STORAGE_FILE_STORAGE}
|
||||
- MIXED_STORAGE_CRYPTO_STORAGE=${MIXED_STORAGE_CRYPTO_STORAGE}
|
||||
- MIXED_STORAGE_DETECTOR_STORAGE=${MIXED_STORAGE_DETECTOR_STORAGE}
|
||||
- META_CALLBACK_NAME=${META_CALLBACK_NAME}
|
||||
- DETECTORS=${DETECTORS}
|
||||
- FACE_DETECTOR_CASCADE_FILE=${FACE_DETECTOR_CASCADE_FILE}
|
||||
- OPTIMIZERS=${OPTIMIZERS}
|
||||
- JPEGTRAN_PATH=${JPEGTRAN_PATH}
|
||||
- PROGRESSIVE_JPEG=${PROGRESSIVE_JPEG}
|
||||
- RESULT_STORAGE_EXPIRATION_SECONDS=${RESULT_STORAGE_EXPIRATION_SECONDS}
|
||||
- RESULT_STORAGE_FILE_STORAGE_ROOT_PATH=${RESULT_STORAGE_FILE_STORAGE_ROOT_PATH}
|
||||
- RESULT_STORAGE_STORES_UNSAFE=${RESULT_STORAGE_STORES_UNSAFE}
|
||||
- REDIS_QUEUE_SERVER_HOST=${REDIS_QUEUE_SERVER_HOST}
|
||||
- REDIS_QUEUE_SERVER_PORT=${REDIS_QUEUE_SERVER_PORT}
|
||||
- REDIS_QUEUE_SERVER_DB=${REDIS_QUEUE_SERVER_DB}
|
||||
- REDIS_QUEUE_SERVER_PASSWORD=${REDIS_QUEUE_SERVER_PASSWORD}
|
||||
- SQS_QUEUE_KEY_ID=${SQS_QUEUE_KEY_ID}
|
||||
- SQS_QUEUE_KEY_SECRET=${SQS_QUEUE_KEY_SECRET}
|
||||
- SQS_QUEUE_REGION=${SQS_QUEUE_REGION}
|
||||
- USE_CUSTOM_ERROR_HANDLING=${USE_CUSTOM_ERROR_HANDLING}
|
||||
- ERROR_HANDLER_MODULE=${ERROR_HANDLER_MODULE}
|
||||
- ERROR_FILE_LOGGER=${ERROR_FILE_LOGGER}
|
||||
- ERROR_FILE_NAME_USE_CONTEXT=${ERROR_FILE_NAME_USE_CONTEXT}
|
||||
- SENTRY_DSN_URL=${SENTRY_DSN_URL}
|
||||
- TC_AWS_REGION=${TC_AWS_REGION}
|
||||
- TC_AWS_ENDPOINT=${TC_AWS_ENDPOINT}
|
||||
- TC_AWS_STORAGE_BUCKET=${TC_AWS_STORAGE_BUCKET}
|
||||
- TC_AWS_STORAGE_ROOT_PATH=${TC_AWS_STORAGE_ROOT_PATH}
|
||||
- TC_AWS_LOADER_BUCKET=${TC_AWS_LOADER_BUCKET}
|
||||
- TC_AWS_LOADER_ROOT_PATH=${TC_AWS_LOADER_ROOT_PATH}
|
||||
- TC_AWS_RESULT_STORAGE_BUCKET=${TC_AWS_RESULT_STORAGE_BUCKET}
|
||||
- TC_AWS_RESULT_STORAGE_ROOT_PATH=${TC_AWS_RESULT_STORAGE_ROOT_PATH}
|
||||
- TC_AWS_STORAGE_SSE=${TC_AWS_STORAGE_SSE}
|
||||
- TC_AWS_STORAGE_RRS=${TC_AWS_STORAGE_RRS}
|
||||
- TC_AWS_ENABLE_HTTP_LOADER=${TC_AWS_ENABLE_HTTP_LOADER}
|
||||
- TC_AWS_ALLOWED_BUCKETS=${TC_AWS_ALLOWED_BUCKETS}
|
||||
- TC_AWS_STORE_METADATA=${TC_AWS_STORE_METADATA}
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### AWS EB-CLI ################################################
|
||||
aws:
|
||||
build:
|
||||
@ -693,3 +881,444 @@ services:
|
||||
depends_on:
|
||||
- workspace
|
||||
tty: true
|
||||
|
||||
### Portainer ################################################
|
||||
portainer:
|
||||
build:
|
||||
context: ./portainer
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/portainer_data:/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
extra_hosts:
|
||||
- "dockerhost:${DOCKER_HOST_IP}"
|
||||
ports:
|
||||
- 9010:9000
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Gitlab ################################################
|
||||
gitlab:
|
||||
build:
|
||||
context: ./gitlab
|
||||
environment:
|
||||
GITLAB_OMNIBUS_CONFIG: |
|
||||
external_url '${GITLAB_DOMAIN_NAME}'
|
||||
redis['enable'] = false
|
||||
nginx['listen_https'] = false
|
||||
nginx['listen_port'] = 80
|
||||
postgresql['enable'] = false
|
||||
gitlab_rails['trusted_proxies'] = ['caddy','nginx','apache2']
|
||||
gitlab_rails['redis_host'] = 'redis'
|
||||
gitlab_rails['redis_database'] = 8
|
||||
gitlab_rails['db_host'] = 'postgres'
|
||||
gitlab_rails['db_username'] = 'laradock_gitlab'
|
||||
gitlab_rails['db_password'] = 'laradock_gitlab'
|
||||
gitlab_rails['db_database'] = 'laradock_gitlab'
|
||||
gitlab_rails['initial_root_password'] = '${GITLAB_ROOT_PASSWORD}'
|
||||
gitlab_rails['gitlab_shell_ssh_port'] = ${GITLAB_HOST_SSH_PORT}
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/gitlab/config:/etc/gitlab
|
||||
- ${DATA_PATH_HOST}/gitlab/data:/var/opt/gitlab
|
||||
- ${GITLAB_HOST_LOG_PATH}:/var/log/gitlab
|
||||
ports:
|
||||
- "${GITLAB_HOST_HTTP_PORT}:80"
|
||||
- "${GITLAB_HOST_HTTPS_PORT}:443"
|
||||
- "${GITLAB_HOST_SSH_PORT}:22"
|
||||
networks:
|
||||
- backend
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
gitlab-runner:
|
||||
image: gitlab/gitlab-runner:latest
|
||||
environment:
|
||||
- CI_SERVER_URL=${GITLAB_DOMAIN_NAME}
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/gitlab/runner:/etc/gitlab-runner
|
||||
- /var/run/docker.sock:/var/run/docker.sock:rw
|
||||
restart: always
|
||||
|
||||
### JupyterHub #########################################
|
||||
jupyterhub:
|
||||
build:
|
||||
context: ./jupyterhub
|
||||
depends_on:
|
||||
- postgres
|
||||
- jupyterhub-user
|
||||
restart: always
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:rw
|
||||
- ${DATA_PATH_HOST}/jupyterhub/:/data
|
||||
- ${JUPYTERHUB_CUSTOM_CONFIG}:/jupyterhub_config.py
|
||||
- ${JUPYTERHUB_USER_DATA}:/user-data
|
||||
- ${JUPYTERHUB_USER_LIST}:/userlist
|
||||
networks:
|
||||
- backend
|
||||
ports:
|
||||
- "${JUPYTERHUB_PORT}:80"
|
||||
environment:
|
||||
- TERM=xterm
|
||||
- JUPYTERHUB_USER_DATA=${JUPYTERHUB_USER_DATA}
|
||||
- JUPYTERHUB_POSTGRES_DB=${JUPYTERHUB_POSTGRES_DB}
|
||||
- JUPYTERHUB_POSTGRES_USER=${JUPYTERHUB_POSTGRES_USER}
|
||||
- JUPYTERHUB_POSTGRES_HOST=${JUPYTERHUB_POSTGRES_HOST}
|
||||
- JUPYTERHUB_POSTGRES_PASSWORD=${JUPYTERHUB_POSTGRES_PASSWORD}
|
||||
- JUPYTERHUB_OAUTH_CALLBACK_URL=${JUPYTERHUB_OAUTH_CALLBACK_URL}
|
||||
- JUPYTERHUB_OAUTH_CLIENT_ID=${JUPYTERHUB_OAUTH_CLIENT_ID}
|
||||
- JUPYTERHUB_OAUTH_CLIENT_SECRET=${JUPYTERHUB_OAUTH_CLIENT_SECRET}
|
||||
- JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE=${JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE}
|
||||
jupyterhub-user:
|
||||
build:
|
||||
context: ./jupyterhub
|
||||
dockerfile: Dockerfile.user
|
||||
command: ["sh", "-c", "echo \"build only\""]
|
||||
|
||||
### IPython #########################################
|
||||
ipython-controller:
|
||||
build:
|
||||
context: ./ipython
|
||||
dockerfile: Dockerfile.controller
|
||||
networks:
|
||||
- backend
|
||||
extra_hosts:
|
||||
- "laradock-ipython:${LARADOCK_IPYTHON_CONTROLLER_IP}"
|
||||
ports:
|
||||
- "33327-33338:33327-33338"
|
||||
ipython-engine:
|
||||
build:
|
||||
context: ./ipython
|
||||
dockerfile: Dockerfile.engine
|
||||
networks:
|
||||
- backend
|
||||
extra_hosts:
|
||||
- "laradock-ipython:${LARADOCK_IPYTHON_CONTROLLER_IP}"
|
||||
|
||||
### Docker-in-Docker ################################################
|
||||
docker-in-docker:
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
expose:
|
||||
- 2375
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### NetData ################################################
|
||||
netdata:
|
||||
image: titpetric/netdata:latest
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
volumes:
|
||||
- /:/host:ro
|
||||
ports:
|
||||
- "${NETDATA_PORT}:19999"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### PHPRedisAdmin ################################################
|
||||
phpredisadmin:
|
||||
image: erikdubbelboer/phpredisadmin:latest
|
||||
environment:
|
||||
- ADMIN_USER=${REDIS_WEBUI_USERNAME}
|
||||
- ADMIN_PASS=${REDIS_WEBUI_PASSWORD}
|
||||
- REDIS_1_HOST=${REDIS_WEBUI_CONNECT_HOST}
|
||||
- REDIS_1_PORT=${REDIS_WEBUI_CONNECT_PORT}
|
||||
networks:
|
||||
- backend
|
||||
ports:
|
||||
- "${REDIS_WEBUI_PORT}:80"
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
### MongoWebUI ################################################
|
||||
mongo-webui:
|
||||
build:
|
||||
context: ./mongo-webui
|
||||
restart: always
|
||||
environment:
|
||||
- ROOT_URL=${MONGO_WEBUI_ROOT_URL}
|
||||
- MONGO_URL=${MONGO_WEBUI_MONGO_URL}
|
||||
- INSTALL_MONGO=${MONGO_WEBUI_INSTALL_MONGO}
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/mongo-webui:/data/db
|
||||
ports:
|
||||
- "${MONGO_WEBUI_PORT}:3000"
|
||||
networks:
|
||||
- backend
|
||||
depends_on:
|
||||
- mongo
|
||||
|
||||
### Metabase #################################################
|
||||
metabase:
|
||||
image: metabase/metabase:latest
|
||||
environment:
|
||||
- MB_DB_FILE=/metabase-data/${METABASE_DB_FILE}
|
||||
ports:
|
||||
- ${METABASE_PORT}:3000
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/metabase-data:/metabase-data
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### IDE-THEIA ################################################
|
||||
ide-theia:
|
||||
build:
|
||||
context: ./ide-theia
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:/home/project
|
||||
ports:
|
||||
- "${IDE_THEIA_PORT}:3000"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### IDE-WEBIDE ################################################
|
||||
ide-webide:
|
||||
build:
|
||||
context: ./ide-webide
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/ide/webide/ide.db:/root/.coding-ide/ide.db
|
||||
ports:
|
||||
- "${IDE_WEBIDE_PORT}:8080"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### IDE-CODIAD ################################################
|
||||
ide-codiad:
|
||||
build:
|
||||
context: ./ide-codiad
|
||||
environment:
|
||||
- APP_CODE_PATH_CONTAINER=${APP_CODE_PATH_CONTAINER}
|
||||
- TZ=${WORKSPACE_TIMEZONE}
|
||||
- PGID=1000
|
||||
- PUID=1000
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
- ${DATA_PATH_HOST}/ide/codiad:/config
|
||||
ports:
|
||||
- "${IDE_CODIAD_PORT}:80"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### IDE-ICECODER ################################################
|
||||
ide-icecoder:
|
||||
build:
|
||||
context: ./ide-icecoder
|
||||
environment:
|
||||
- DOCUMENT_ROOT=${APP_CODE_PATH_CONTAINER}
|
||||
- TZ=${WORKSPACE_TIMEZONE}
|
||||
- PGID=1000
|
||||
- PUID=1000
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${APP_CODE_PATH_HOST}:/home/laradock/ICEcoder/dev
|
||||
ports:
|
||||
- "${IDE_ICECODER_PORT}:8080"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### DOCKER-REGISTRY ################################################
|
||||
docker-registry:
|
||||
build:
|
||||
context: ./docker-registry
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ${DATA_PATH_HOST}/docker-registry:/var/lib/registry
|
||||
ports:
|
||||
- "${DOCKER_REGISTRY_PORT}:5000"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### DOCKER-WEB-UI ################################################
|
||||
docker-web-ui:
|
||||
build:
|
||||
context: ./docker-web-ui
|
||||
environment:
|
||||
- TZ=${WORKSPACE_TIMEZONE}
|
||||
- ENV_DOCKER_REGISTRY_HOST=${DOCKER_WEBUI_REGISTRY_HOST}
|
||||
- ENV_DOCKER_REGISTRY_PORT=${DOCKER_WEBUI_REGISTRY_PORT}
|
||||
- ENV_DOCKER_REGISTRY_USE_SSL=${DOCKER_REGISTRY_USE_SSL}
|
||||
- ENV_MODE_BROWSE_ONLY=${DOCKER_REGISTRY_BROWSE_ONLY}
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "${DOCKER_WEBUI_PORT}:80"
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### MAILU ################################################
|
||||
mailu:
|
||||
image: mailu/admin:${MAILU_VERSION}
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/data:/data"
|
||||
- "${DATA_PATH_HOST}/mailu/dkim:/dkim"
|
||||
- "${DATA_PATH_HOST}/mailu/webmail:/webmail"
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
depends_on:
|
||||
- mailu-front
|
||||
- mailu-imap
|
||||
- mailu-smtp
|
||||
- mailu-antispam
|
||||
- mailu-antivirus
|
||||
- mailu-webdav
|
||||
- mailu-admin
|
||||
- mailu-webmail
|
||||
- mailu-fetchmail
|
||||
command: ["sh", "-c", "echo ${MAILU_INIT_ADMIN_USERNAME}@${MAILU_DOMAIN} ${MAILU_INIT_ADMIN_PASSWORD} ;python manage.py advertise ; python manage.py db upgrade ; python manage.py admin ${MAILU_INIT_ADMIN_USERNAME} ${MAILU_DOMAIN} ${MAILU_INIT_ADMIN_PASSWORD} || true;sed -i -- \"s/= Off/= On/g\" /webmail/_data_/_default_/configs/config.ini || true;if grep -Fq \"registration_link_url\" /webmail/_data_/_default_/configs/config.ini;then echo Already set!;else echo \"\" >> /webmail/_data_/_default_/configs/config.ini; echo \"[login]\" >> /webmail/_data_/_default_/configs/config.ini;echo \"registration_link_url = '${MAILU_WEBSITE}${MAILU_WEB_ADMIN}/ui/user/signup'\" >> /webmail/_data_/_default_/configs/config.ini;fi"]
|
||||
networks:
|
||||
- backend
|
||||
mailu-front:
|
||||
image: mailu/nginx:${MAILU_VERSION}
|
||||
environment:
|
||||
- ADMIN=${MAILU_ADMIN}
|
||||
- WEB_ADMIN=${MAILU_WEB_ADMIN}
|
||||
- WEB_WEBMAIL=${MAILU_WEB_WEBMAIL}
|
||||
- WEBDAV=${MAILU_WEBDAV}
|
||||
- HOSTNAMES=${MAILU_HOSTNAMES}
|
||||
- TLS_FLAVOR=${MAILU_TLS_FLAVOR}
|
||||
- MESSAGE_SIZE_LIMIT=${MAILU_MESSAGE_SIZE_LIMIT}
|
||||
ports:
|
||||
- "${MAILU_HTTP_PORT}:80"
|
||||
- "${MAILU_HTTPS_PORT}:443"
|
||||
- "110:110"
|
||||
- "143:143"
|
||||
- "993:993"
|
||||
- "995:995"
|
||||
- "25:25"
|
||||
- "465:465"
|
||||
- "587:587"
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/certs:/certs"
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- front
|
||||
mailu-imap:
|
||||
image: mailu/dovecot:${MAILU_VERSION}
|
||||
environment:
|
||||
- DOMAIN=${MAILU_DOMAIN}
|
||||
- HOSTNAMES=${MAILU_HOSTNAMES}
|
||||
- POSTMASTER=${MAILU_POSTMASTER}
|
||||
- WEBMAIL=${MAILU_WEBMAIL}
|
||||
- RECIPIENT_DELIMITER=${MAILU_RECIPIENT_DELIMITER}
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/data:/data"
|
||||
- "${DATA_PATH_HOST}/mailu/mail:/mail"
|
||||
- "${DATA_PATH_HOST}/mailu/overrides:/overrides"
|
||||
depends_on:
|
||||
- mailu-front
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- imap
|
||||
mailu-smtp:
|
||||
image: mailu/postfix:${MAILU_VERSION}
|
||||
environment:
|
||||
- DOMAIN=${MAILU_DOMAIN}
|
||||
- HOSTNAMES=${MAILU_HOSTNAMES}
|
||||
- RELAYHOST=${MAILU_RELAYHOST}
|
||||
- RELAYNETS=${MAILU_RELAYNETS}
|
||||
- RECIPIENT_DELIMITER=${MAILU_RECIPIENT_DELIMITER}
|
||||
- MESSAGE_SIZE_LIMIT=${MAILU_MESSAGE_SIZE_LIMIT}
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/data:/data"
|
||||
- "${DATA_PATH_HOST}/mailu/overrides:/overrides"
|
||||
depends_on:
|
||||
- mailu-front
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- smtp
|
||||
mailu-antispam:
|
||||
image: mailu/rspamd:${MAILU_VERSION}
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/filter:/var/lib/rspamd"
|
||||
- "${DATA_PATH_HOST}/mailu/dkim:/dkim"
|
||||
- "${DATA_PATH_HOST}/mailu/overrides/rspamd:/etc/rspamd/override.d"
|
||||
depends_on:
|
||||
- mailu-front
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- antispam
|
||||
mailu-antivirus:
|
||||
image: mailu/clamav:${MAILU_VERSION}
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/filter:/data"
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- antivirus
|
||||
mailu-webdav:
|
||||
image: mailu/${MAILU_WEBDAV}:${MAILU_VERSION}
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/dav:/data"
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- webdav
|
||||
mailu-admin:
|
||||
image: mailu/admin:${MAILU_VERSION}
|
||||
environment:
|
||||
- DOMAIN=${MAILU_DOMAIN}
|
||||
- HOSTNAMES=${MAILU_HOSTNAMES}
|
||||
- POSTMASTER=${MAILU_POSTMASTER}
|
||||
- SECRET_KEY=${MAILU_SECRET_KEY}
|
||||
- AUTH_RATELIMIT=${MAILU_AUTH_RATELIMIT}
|
||||
- TLS_FLAVOR=${MAILU_TLS_FLAVOR}
|
||||
- DISABLE_STATISTICS=${MAILU_DISABLE_STATISTICS}
|
||||
- DMARC_RUA=${MAILU_DMARC_RUA}
|
||||
- DMARC_RUF=${MAILU_DMARC_RUF}
|
||||
- WELCOME=${MAILU_WELCOME}
|
||||
- WELCOME_SUBJECT=${MAILU_WELCOME_SUBJECT}
|
||||
- WELCOME_BODY=${MAILU_WELCOME_BODY}
|
||||
- WEB_ADMIN=${MAILU_WEB_ADMIN}
|
||||
- WEB_WEBMAIL=${MAILU_WEB_WEBMAIL}
|
||||
- WEBSITE=${MAILU_WEBSITE}
|
||||
- WEBMAIL=${MAILU_WEBMAIL}
|
||||
- SITENAME=${MAILU_SITENAME}
|
||||
- PASSWORD_SCHEME=${MAILU_PASSWORD_SCHEME}
|
||||
- RECAPTCHA_PUBLIC_KEY=${MAILU_RECAPTCHA_PUBLIC_KEY}
|
||||
- RECAPTCHA_PRIVATE_KEY=${MAILU_RECAPTCHA_PRIVATE_KEY}
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/data:/data"
|
||||
- "${DATA_PATH_HOST}/mailu/dkim:/dkim"
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
depends_on:
|
||||
- redis
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- admin
|
||||
mailu-webmail:
|
||||
image: "mailu/${MAILU_WEBMAIL}:${MAILU_VERSION}"
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/webmail:/data"
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- webmail
|
||||
mailu-fetchmail:
|
||||
image: mailu/fetchmail:${MAILU_VERSION}
|
||||
environment:
|
||||
- FETCHMAIL_DELAY=${MAILU_FETCHMAIL_DELAY}
|
||||
volumes:
|
||||
- "${DATA_PATH_HOST}/mailu/data:/data"
|
||||
networks:
|
||||
backend:
|
||||
aliases:
|
||||
- fetchmail
|
||||
|
||||
### MOSQUITTO Broker #########################################
|
||||
mosquitto:
|
||||
build:
|
||||
context: ./mosquitto
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/mosquitto/data:/mosquitto/data
|
||||
ports:
|
||||
- "${MOSQUITTO_PORT}:9001"
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
3
docker-registry/Dockerfile
Normal file
3
docker-registry/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM registry:2
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
@ -6,7 +6,7 @@ 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
|
||||
src: '${APP_CODE_PATH_HOST}' # 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'
|
||||
|
||||
|
3
docker-web-ui/Dockerfile
Normal file
3
docker-web-ui/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM konradkleine/docker-registry-frontend:v2
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
297
env-example
297
env-example
@ -29,10 +29,18 @@ COMPOSE_FILE=docker-compose.yml
|
||||
# Change the separator from : to ; on Windows
|
||||
COMPOSE_PATH_SEPARATOR=:
|
||||
|
||||
# Define the prefix of container names. This is useful if you have multiple projects that use laradock to have seperate containers per project.
|
||||
COMPOSE_PROJECT_NAME=laradock
|
||||
|
||||
### PHP Version ###########################################
|
||||
|
||||
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 72 - 71 - 70 - 56
|
||||
PHP_VERSION=72
|
||||
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6
|
||||
PHP_VERSION=7.2
|
||||
|
||||
### Phalcon Version ###########################################
|
||||
|
||||
# Select a Phalcon version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 3.4.0+
|
||||
PHALCON_VERSION=3.4.1
|
||||
|
||||
### PHP Interpreter #######################################
|
||||
|
||||
@ -70,24 +78,31 @@ DOCKER_SYNC_STRATEGY=native_osx
|
||||
|
||||
### WORKSPACE #############################################
|
||||
|
||||
|
||||
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
|
||||
WORKSPACE_COMPOSER_REPO_PACKAGIST=
|
||||
WORKSPACE_INSTALL_NODE=true
|
||||
WORKSPACE_NODE_VERSION=stable
|
||||
WORKSPACE_NODE_VERSION=node
|
||||
WORKSPACE_NPM_REGISTRY=
|
||||
WORKSPACE_INSTALL_YARN=true
|
||||
WORKSPACE_YARN_VERSION=latest
|
||||
WORKSPACE_INSTALL_NPM_GULP=true
|
||||
WORKSPACE_INSTALL_NPM_BOWER=false
|
||||
WORKSPACE_INSTALL_NPM_VUE_CLI=true
|
||||
WORKSPACE_INSTALL_PHPREDIS=true
|
||||
WORKSPACE_INSTALL_WORKSPACE_SSH=false
|
||||
WORKSPACE_INSTALL_SUBVERSION=false
|
||||
WORKSPACE_INSTALL_XDEBUG=false
|
||||
WORKSPACE_INSTALL_PHPDBG=false
|
||||
WORKSPACE_INSTALL_SSH2=false
|
||||
WORKSPACE_INSTALL_LDAP=false
|
||||
WORKSPACE_INSTALL_GMP=false
|
||||
WORKSPACE_INSTALL_SOAP=false
|
||||
WORKSPACE_INSTALL_IMAP=false
|
||||
WORKSPACE_INSTALL_MONGO=false
|
||||
WORKSPACE_INSTALL_AMQP=false
|
||||
WORKSPACE_INSTALL_MSSQL=false
|
||||
WORKSPACE_INSTALL_DRUSH=false
|
||||
WORKSPACE_DRUSH_VERSION=8.1.17
|
||||
WORKSPACE_INSTALL_DRUPAL_CONSOLE=false
|
||||
WORKSPACE_INSTALL_AEROSPIKE=false
|
||||
WORKSPACE_INSTALL_V8JS=false
|
||||
@ -104,10 +119,14 @@ WORKSPACE_INSTALL_IMAGEMAGICK=false
|
||||
WORKSPACE_INSTALL_TERRAFORM=false
|
||||
WORKSPACE_INSTALL_DUSK_DEPS=false
|
||||
WORKSPACE_INSTALL_PG_CLIENT=false
|
||||
WORKSPACE_INSTALL_PHALCON=false
|
||||
WORKSPACE_INSTALL_SWOOLE=false
|
||||
WORKSPACE_INSTALL_LIBPNG=false
|
||||
WORKSPACE_INSTALL_IONCUBE=false
|
||||
WORKSPACE_INSTALL_MYSQL_CLIENT=false
|
||||
WORKSPACE_PUID=1000
|
||||
WORKSPACE_PGID=1000
|
||||
WORKSPACE_CHROME_DRIVER_VERSION=2.32
|
||||
WORKSPACE_CHROME_DRIVER_VERSION=2.42
|
||||
WORKSPACE_TIMEZONE=UTC
|
||||
WORKSPACE_SSH_PORT=2222
|
||||
|
||||
@ -116,7 +135,6 @@ WORKSPACE_SSH_PORT=2222
|
||||
PHP_FPM_INSTALL_ZIP_ARCHIVE=true
|
||||
PHP_FPM_INSTALL_BCMATH=true
|
||||
PHP_FPM_INSTALL_MYSQLI=true
|
||||
PHP_FPM_INSTALL_TOKENIZER=true
|
||||
PHP_FPM_INSTALL_INTL=true
|
||||
PHP_FPM_INSTALL_IMAGEMAGICK=true
|
||||
PHP_FPM_INSTALL_OPCACHE=true
|
||||
@ -124,24 +142,39 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true
|
||||
PHP_FPM_INSTALL_PHPREDIS=true
|
||||
PHP_FPM_INSTALL_MEMCACHED=false
|
||||
PHP_FPM_INSTALL_XDEBUG=false
|
||||
PHP_FPM_INSTALL_PHPDBG=false
|
||||
PHP_FPM_INSTALL_IMAP=false
|
||||
PHP_FPM_INSTALL_MONGO=false
|
||||
PHP_FPM_INSTALL_AMQP=false
|
||||
PHP_FPM_INSTALL_MSSQL=false
|
||||
PHP_FPM_INSTALL_SSH2=false
|
||||
PHP_FPM_INSTALL_SOAP=false
|
||||
PHP_FPM_INSTALL_GMP=false
|
||||
PHP_FPM_INSTALL_EXIF=false
|
||||
PHP_FPM_INSTALL_AEROSPIKE=false
|
||||
PHP_FPM_INSTALL_PGSQL=false
|
||||
PHP_FPM_INSTALL_POSTGRES=false
|
||||
PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
||||
PHP_FPM_INSTALL_LDAP=false
|
||||
PHP_FPM_INSTALL_PHALCON=false
|
||||
PHP_FPM_INSTALL_SWOOLE=false
|
||||
PHP_FPM_INSTALL_PG_CLIENT=false
|
||||
PHP_FPM_INSTALL_PCNTL=false
|
||||
PHP_FPM_INSTALL_CALENDAR=false
|
||||
PHP_FPM_INSTALL_FAKETIME=false
|
||||
PHP_FPM_INSTALL_IONCUBE=false
|
||||
PHP_FPM_FAKETIME=-0
|
||||
PHP_FPM_INSTALL_APCU=false
|
||||
PHP_FPM_INSTALL_YAML=false
|
||||
|
||||
### PHP_WORKER ############################################
|
||||
|
||||
PHP_WORKER_INSTALL_PGSQL=false
|
||||
PHP_WORKER_INSTALL_BCMATH=false
|
||||
PHP_WORKER_INSTALL_PHALCON=false
|
||||
PHP_WORKER_INSTALL_SOAP=false
|
||||
PHP_WORKER_INSTALL_ZIP_ARCHIVE=false
|
||||
PHP_WORKER_PUID=1000
|
||||
PHP_WORKER_PGID=1000
|
||||
|
||||
### NGINX #################################################
|
||||
|
||||
@ -151,6 +184,7 @@ NGINX_HOST_LOG_PATH=./logs/nginx/
|
||||
NGINX_SITES_PATH=./nginx/sites/
|
||||
NGINX_PHP_UPSTREAM_CONTAINER=php-fpm
|
||||
NGINX_PHP_UPSTREAM_PORT=9000
|
||||
NGINX_SSL_PATH=./nginx/ssl/
|
||||
|
||||
### APACHE ################################################
|
||||
|
||||
@ -177,6 +211,10 @@ MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d
|
||||
|
||||
REDIS_PORT=6379
|
||||
|
||||
### ZooKeeper #############################################
|
||||
|
||||
ZOOKEEPER_PORT=2181
|
||||
|
||||
### Percona ###############################################
|
||||
|
||||
PERCONA_DATABASE=homestead
|
||||
@ -207,6 +245,7 @@ POSTGRES_DB=default
|
||||
POSTGRES_USER=default
|
||||
POSTGRES_PASSWORD=secret
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d
|
||||
|
||||
### RABBITMQ ##############################################
|
||||
|
||||
@ -319,6 +358,11 @@ AEROSPIKE_FABRIC_PORT=3001
|
||||
AEROSPIKE_HEARTBEAT_PORT=3002
|
||||
AEROSPIKE_INFO_PORT=3003
|
||||
|
||||
# for all versions
|
||||
AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz
|
||||
# for php 5.6
|
||||
# AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz
|
||||
|
||||
### RETHINKDB #############################################
|
||||
|
||||
RETHINKDB_PORT=8090
|
||||
@ -332,14 +376,251 @@ MONGODB_PORT=27017
|
||||
CADDY_HOST_HTTP_PORT=80
|
||||
CADDY_HOST_HTTPS_PORT=443
|
||||
CADDY_HOST_LOG_PATH=./logs/caddy
|
||||
CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
|
||||
CADDY_CONFIG_PATH=./caddy/caddy
|
||||
|
||||
### LARAVEL ECHO SERVER ###################################
|
||||
|
||||
LARAVEL_ECHO_SERVER_PORT=6001
|
||||
|
||||
### THUMBOR ############################################################################################################
|
||||
|
||||
THUMBOR_PORT=8000
|
||||
THUMBOR_LOG_FORMAT="%(asctime)s %(name)s:%(levelname)s %(message)s"
|
||||
THUMBOR_LOG_DATE_FORMAT="%Y-%m-%d %H:%M:%S"
|
||||
MAX_WIDTH=0
|
||||
MAX_HEIGHT=0
|
||||
MIN_WIDTH=1
|
||||
MIN_HEIGHT=1
|
||||
ALLOWED_SOURCES=[]
|
||||
QUALITY=80
|
||||
WEBP_QUALITY=None
|
||||
PNG_COMPRESSION_LEVEL=6
|
||||
AUTO_WEBP=False
|
||||
MAX_AGE=86400
|
||||
MAX_AGE_TEMP_IMAGE=0
|
||||
RESPECT_ORIENTATION=False
|
||||
IGNORE_SMART_ERRORS=False
|
||||
PRESERVE_EXIF_INFO=False
|
||||
ALLOW_ANIMATED_GIFS=True
|
||||
USE_GIFSICLE_ENGINE=False
|
||||
USE_BLACKLIST=False
|
||||
LOADER=thumbor.loaders.http_loader
|
||||
STORAGE=thumbor.storages.file_storage
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
RESULT_STORAGE=thumbor.result_storages.file_storage
|
||||
ENGINE=thumbor.engines.pil
|
||||
SECURITY_KEY="MY_SECURE_KEY"
|
||||
ALLOW_UNSAFE_URL=True
|
||||
ALLOW_OLD_URLS=True
|
||||
FILE_LOADER_ROOT_PATH=/data/loader
|
||||
HTTP_LOADER_CONNECT_TIMEOUT=5
|
||||
HTTP_LOADER_REQUEST_TIMEOUT=20
|
||||
HTTP_LOADER_FOLLOW_REDIRECTS=True
|
||||
HTTP_LOADER_MAX_REDIRECTS=5
|
||||
HTTP_LOADER_FORWARD_USER_AGENT=False
|
||||
HTTP_LOADER_DEFAULT_USER_AGENT="Thumbor/5.2.1"
|
||||
HTTP_LOADER_PROXY_HOST=None
|
||||
HTTP_LOADER_PROXY_PORT=None
|
||||
HTTP_LOADER_PROXY_USERNAME=None
|
||||
HTTP_LOADER_PROXY_PASSWORD=None
|
||||
HTTP_LOADER_CA_CERTS=None
|
||||
HTTP_LOADER_VALIDATE_CERTS=True
|
||||
HTTP_LOADER_CLIENT_KEY=None
|
||||
HTTP_LOADER_CLIENT_CERT=None
|
||||
HTTP_LOADER_CURL_ASYNC_HTTP_CLIENT=False
|
||||
STORAGE_EXPIRATION_SECONDS=2592000
|
||||
STORES_CRYPTO_KEY_FOR_EACH_IMAGE=False
|
||||
FILE_STORAGE_ROOT_PATH=/data/storage
|
||||
UPLOAD_MAX_SIZE=0
|
||||
UPLOAD_ENABLED=False
|
||||
UPLOAD_PHOTO_STORAGE=thumbor.storages.file_storage
|
||||
UPLOAD_DELETE_ALLOWED=False
|
||||
UPLOAD_PUT_ALLOWED=False
|
||||
UPLOAD_DEFAULT_FILENAME=image
|
||||
MONGO_STORAGE_SERVER_HOST=mongo
|
||||
MONGO_STORAGE_SERVER_PORT=27017
|
||||
MONGO_STORAGE_SERVER_DB=thumbor
|
||||
MONGO_STORAGE_SERVER_COLLECTION=images
|
||||
REDIS_STORAGE_SERVER_HOST=redis
|
||||
REDIS_STORAGE_SERVER_PORT=6379
|
||||
REDIS_STORAGE_SERVER_DB=0
|
||||
REDIS_STORAGE_SERVER_PASSWORD=None
|
||||
REDIS_RESULT_STORAGE_SERVER_HOST=redis
|
||||
REDIS_RESULT_STORAGE_SERVER_PORT=6379
|
||||
REDIS_RESULT_STORAGE_SERVER_DB=0
|
||||
REDIS_RESULT_STORAGE_SERVER_PASSWORD=None
|
||||
MEMCACHE_STORAGE_SERVERS=["localhost:11211",]
|
||||
MIXED_STORAGE_FILE_STORAGE=thumbor.storages.no_storage
|
||||
MIXED_STORAGE_CRYPTO_STORAGE=thumbor.storages.no_storage
|
||||
MIXED_STORAGE_DETECTOR_STORAGE=thumbor.storages.no_storage
|
||||
META_CALLBACK_NAME=None
|
||||
DETECTORS=[]
|
||||
FACE_DETECTOR_CASCADE_FILE=haarcascade_frontalface_alt.xml
|
||||
OPTIMIZERS=[]
|
||||
JPEGTRAN_PATH=/usr/bin/jpegtran
|
||||
PROGRESSIVE_JPEG=True
|
||||
FILTERS=["thumbor.filters.brightness", "thumbor.filters.contrast", "thumbor.filters.rgb", "thumbor.filters.round_corner", "thumbor.filters.quality", "thumbor.filters.noise", "thumbor.filters.watermark", "thumbor.filters.equalize", "thumbor.filters.fill", "thumbor.filters.sharpen", "thumbor.filters.strip_icc", "thumbor.filters.frame", "thumbor.filters.grayscale", "thumbor.filters.rotate", "thumbor.filters.format", "thumbor.filters.max_bytes", "thumbor.filters.convolution", "thumbor.filters.blur", "thumbor.filters.extract_focal", "thumbor.filters.no_upscale"]
|
||||
RESULT_STORAGE_EXPIRATION_SECONDS=0
|
||||
RESULT_STORAGE_FILE_STORAGE_ROOT_PATH=/data/result_storage
|
||||
RESULT_STORAGE_STORES_UNSAFE=False
|
||||
REDIS_QUEUE_SERVER_HOST=redis
|
||||
REDIS_QUEUE_SERVER_PORT=6379
|
||||
REDIS_QUEUE_SERVER_DB="0"
|
||||
REDIS_QUEUE_SERVER_PASSWORD=None
|
||||
SQS_QUEUE_KEY_ID=None
|
||||
SQS_QUEUE_KEY_SECRET=None
|
||||
SQS_QUEUE_REGION=us-east-1
|
||||
USE_CUSTOM_ERROR_HANDLING=False
|
||||
ERROR_HANDLER_MODULE=thumbor.error_handlers.sentry
|
||||
ERROR_FILE_LOGGER=None
|
||||
ERROR_FILE_NAME_USE_CONTEXT="False"
|
||||
SENTRY_DSN_URL=
|
||||
TC_AWS_REGION=eu-west-1
|
||||
TC_AWS_ENDPOINT=None
|
||||
TC_AWS_STORAGE_BUCKET=
|
||||
TC_AWS_STORAGE_ROOT_PATH=
|
||||
TC_AWS_LOADER_BUCKET=
|
||||
TC_AWS_LOADER_ROOT_PATH=
|
||||
TC_AWS_RESULT_STORAGE_BUCKET=
|
||||
TC_AWS_RESULT_STORAGE_ROOT_PATH=
|
||||
TC_AWS_STORAGE_SSE=False
|
||||
TC_AWS_STORAGE_RRS=False
|
||||
TC_AWS_ENABLE_HTTP_LOADER=False
|
||||
TC_AWS_ALLOWED_BUCKETS=False
|
||||
TC_AWS_STORE_METADATA=False
|
||||
|
||||
### SOLR ##################################################
|
||||
|
||||
SOLR_VERSION=5.5
|
||||
SOLR_PORT=8983
|
||||
SOLR_DATAIMPORTHANDLER_MYSQL=false
|
||||
SOLR_DATAIMPORTHANDLER_MSSQL=false
|
||||
|
||||
### GITLAB ###############################################
|
||||
GITLAB_HOST_HTTP_PORT=8989
|
||||
GITLAB_HOST_HTTPS_PORT=9898
|
||||
GITLAB_HOST_SSH_PORT=2289
|
||||
GITLAB_DOMAIN_NAME=http://localhost
|
||||
GITLAB_ROOT_PASSWORD=laradock
|
||||
GITLAB_HOST_LOG_PATH=./logs/gitlab
|
||||
|
||||
### JUPYTERHUB ###############################################
|
||||
JUPYTERHUB_POSTGRES_HOST=postgres
|
||||
JUPYTERHUB_POSTGRES_USER=laradock_jupyterhub
|
||||
JUPYTERHUB_POSTGRES_PASSWORD=laradock_jupyterhub
|
||||
JUPYTERHUB_POSTGRES_DB=laradock_jupyterhub
|
||||
JUPYTERHUB_PORT=9991
|
||||
JUPYTERHUB_OAUTH_CALLBACK_URL=http://laradock:9991/hub/oauth_callback
|
||||
JUPYTERHUB_OAUTH_CLIENT_ID={GITHUB_CLIENT_ID}
|
||||
JUPYTERHUB_OAUTH_CLIENT_SECRET={GITHUB_CLIENT_SECRET}
|
||||
JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE=laradock_jupyterhub-user
|
||||
JUPYTERHUB_CUSTOM_CONFIG=./jupyterhub/jupyterhub_config.py
|
||||
JUPYTERHUB_USER_DATA=/jupyterhub
|
||||
JUPYTERHUB_USER_LIST=./jupyterhub/userlist
|
||||
|
||||
### IPYTHON ##################################################
|
||||
LARADOCK_IPYTHON_CONTROLLER_IP=127.0.0.1
|
||||
|
||||
### NETDATA ###############################################
|
||||
NETDATA_PORT=19999
|
||||
|
||||
### PHPREDISADMIN #########################################
|
||||
REDIS_WEBUI_USERNAME=laradock
|
||||
REDIS_WEBUI_PASSWORD=laradock
|
||||
REDIS_WEBUI_CONNECT_HOST=redis
|
||||
REDIS_WEBUI_CONNECT_PORT=6379
|
||||
REDIS_WEBUI_PORT=9987
|
||||
|
||||
### MONGOWEBUI ###############################################
|
||||
MONGO_WEBUI_PORT=3000
|
||||
MONGO_WEBUI_ROOT_URL=http://localhost
|
||||
MONGO_WEBUI_MONGO_URL=mongodb://mongo:27017/
|
||||
MONGO_WEBUI_INSTALL_MONGO=false
|
||||
|
||||
### METABASE ###############################################
|
||||
METABASE_PORT=3030
|
||||
METABASE_DB_FILE=metabase.db
|
||||
METABASE_JAVA_TIMEZONE=US/Pacific
|
||||
|
||||
### IDE ###############################################
|
||||
IDE_THEIA_PORT=987
|
||||
IDE_WEBIDE_PORT=984
|
||||
IDE_CODIAD_PORT=985
|
||||
IDE_ICECODER_PORT=986
|
||||
|
||||
### DOCKERREGISTRY ###############################################
|
||||
DOCKER_REGISTRY_PORT=5000
|
||||
|
||||
### DOCKERWEBUI ###############################################
|
||||
DOCKER_WEBUI_REGISTRY_HOST=docker-registry
|
||||
DOCKER_WEBUI_REGISTRY_PORT=5000
|
||||
# if have use https proxy please set to 1
|
||||
DOCKER_REGISTRY_USE_SSL=0
|
||||
DOCKER_REGISTRY_BROWSE_ONLY=false
|
||||
DOCKER_WEBUI_PORT=8754
|
||||
|
||||
### MAILU ###############################################
|
||||
MAILU_VERSION=latest
|
||||
MAILU_RECAPTCHA_PUBLIC_KEY=<YOUR_RECAPTCHA_PUBLIC_KEY>
|
||||
MAILU_RECAPTCHA_PRIVATE_KEY=<YOUR_RECAPTCHA_PRIVATE_KEY>
|
||||
# Main mail domain
|
||||
MAILU_HTTP_PORT=6080
|
||||
MAILU_HTTPS_PORT=60443
|
||||
MAILU_DOMAIN=example.com
|
||||
MAILU_INIT_ADMIN_USERNAME=laradock
|
||||
MAILU_INIT_ADMIN_PASSWORD=laradock
|
||||
# Hostnames for this server, separated with comas
|
||||
MAILU_HOSTNAMES=mail.example.com,alternative.example.com,yetanother.example.com
|
||||
# Postmaster local part (will append the main mail domain)
|
||||
MAILU_POSTMASTER=admin
|
||||
# Set to a randomly generated 16 bytes string
|
||||
MAILU_SECRET_KEY=ChangeMeChangeMe
|
||||
# Choose how secure connections will behave (value: letsencrypt, cert, notls, mail)
|
||||
MAILU_TLS_FLAVOR=cert
|
||||
# Authentication rate limit (per source IP address)
|
||||
MAILU_AUTH_RATELIMIT=10/minute;1000/hour
|
||||
# Opt-out of statistics, replace with "True" to opt out
|
||||
MAILU_DISABLE_STATISTICS=False
|
||||
# Message size limit in bytes
|
||||
# Default: accept messages up to 50MB
|
||||
MAILU_MESSAGE_SIZE_LIMIT=50000000
|
||||
# Will relay all outgoing mails if configured
|
||||
MAILU_RELAYHOST=
|
||||
# Networks granted relay permissions, make sure that you include your Docker
|
||||
# internal network (default to 172.17.0.0/16)
|
||||
MAILU_RELAYNETS=172.16.0.0/12
|
||||
# Fetchmail delay
|
||||
MAILU_FETCHMAIL_DELAY=600
|
||||
# Recipient delimiter, character used to delimiter localpart from custom address part
|
||||
# e.g. localpart+custom@domain;tld
|
||||
MAILU_RECIPIENT_DELIMITER=+
|
||||
# DMARC rua and ruf email
|
||||
MAILU_DMARC_RUA=admin
|
||||
MAILU_DMARC_RUF=admin
|
||||
# Welcome email, enable and set a topic and body if you wish to send welcome
|
||||
# emails to all users.
|
||||
MAILU_WELCOME=True
|
||||
MAILU_WELCOME_SUBJECT=Welcome to your new email account
|
||||
MAILU_WELCOME_BODY=Welcome to your new email account, if you can read this, then it is configured properly!
|
||||
# Path to the admin interface if enabled
|
||||
MAILU_WEB_ADMIN=/admin
|
||||
# Path to the webmail if enabled
|
||||
MAILU_WEB_WEBMAIL=/webmail
|
||||
# Website name
|
||||
MAILU_SITENAME=Example Mail
|
||||
# Linked Website URL
|
||||
MAILU_WEBSITE=http://mail.example.com
|
||||
# Default password scheme used for newly created accounts and changed passwords
|
||||
# (value: SHA512-CRYPT, SHA256-CRYPT, MD5-CRYPT, CRYPT)
|
||||
MAILU_PASSWORD_SCHEME=SHA512-CRYPT
|
||||
# Expose the admin interface (value: true, false)
|
||||
MAILU_ADMIN=true
|
||||
# Choose which webmail to run if any (values: roundcube, rainloop, none)
|
||||
MAILU_WEBMAIL=rainloop
|
||||
# Dav server implementation (value: radicale, none)
|
||||
MAILU_WEBDAV=radicale
|
||||
|
||||
### MOSQUITTO #################################################
|
||||
|
||||
MOSQUITTO_PORT=9001
|
||||
|
3
gitlab/Dockerfile
Normal file
3
gitlab/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM gitlab/gitlab-ce:latest
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
5
ide-codiad/Dockerfile
Normal file
5
ide-codiad/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM linuxserver/codiad
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
||||
|
||||
COPY config.php /defaults/config.php
|
43
ide-codiad/config.php
Normal file
43
ide-codiad/config.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
|
||||
* as-is and without warranty under the MIT License. See
|
||||
* [root]/license.txt for more. This information must remain intact.
|
||||
*/
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// CONFIG
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// PATH TO CODIAD
|
||||
define("BASE_PATH", "/config/www/");
|
||||
// BASE URL TO CODIAD (without trailing slash)
|
||||
define("BASE_URL", "localhost");
|
||||
// THEME : default, modern or clear (look at /themes)
|
||||
define("THEME", "default");
|
||||
// ABSOLUTE PATH, this is used as whitelist for absolute path projects
|
||||
define("WHITEPATHS", BASE_PATH . ",/home,/");
|
||||
// SESSIONS (e.g. 7200)
|
||||
$cookie_lifetime = "0";
|
||||
// TIMEZONE
|
||||
date_default_timezone_set(getenv('TZ','UTC'));
|
||||
// Allows to overwrite the default language
|
||||
//define("LANGUAGE", "en");
|
||||
// External Authentification
|
||||
//define("AUTH_PATH", "/path/to/customauth.php");
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// ** DO NOT EDIT CONFIG BELOW **
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// PATHS
|
||||
define("COMPONENTS", BASE_PATH . "/components");
|
||||
define("PLUGINS", BASE_PATH . "/plugins");
|
||||
define("THEMES", BASE_PATH . "/themes");
|
||||
define("DATA", BASE_PATH . "/data");
|
||||
define("WORKSPACE", getenv('APP_CODE_PATH_CONTAINER',BASE_PATH . "workspace"));
|
||||
// URLS
|
||||
define("WSURL", getenv('APP_CODE_PATH_CONTAINER',BASE_PATH . "workspace"));
|
||||
// Marketplace
|
||||
define("MARKETURL", "http://market.codiad.com/json");
|
||||
// Update Check
|
||||
//define("UPDATEURL", "http://update.codiad.com/?v={VER}&o={OS}&p={PHP}&w={WEB}&a={ACT}");
|
||||
define("ARCHIVEURL", "https://github.com/Codiad/Codiad/archive/master.zip");
|
||||
define("COMMITURL", "https://api.github.com/repos/Codiad/Codiad/commits");
|
||||
?>
|
21
ide-icecoder/Dockerfile
Normal file
21
ide-icecoder/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM php:alpine
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
||||
|
||||
ARG PUID=1000
|
||||
ENV PUID ${PUID}
|
||||
ARG PGID=1000
|
||||
ENV PGID ${PGID}
|
||||
|
||||
RUN apk add --no-cache git
|
||||
|
||||
RUN addgroup -g $PGID -S laradock && \
|
||||
adduser -u $PUID -S laradock -G laradock
|
||||
|
||||
USER laradock
|
||||
|
||||
RUN cd /home/laradock && git clone https://github.com/mattpass/ICEcoder.git
|
||||
|
||||
WORKDIR /home/laradock/ICEcoder
|
||||
|
||||
CMD ["php","-S","0.0.0.0:8080"]
|
7
ide-theia/Dockerfile
Normal file
7
ide-theia/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM theiaide/theia
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
||||
|
||||
USER root
|
||||
|
||||
RUN echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf
|
3
ide-webide/Dockerfile
Normal file
3
ide-webide/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM webide/webide
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
17
ipython/Dockerfile.controller
Normal file
17
ipython/Dockerfile.controller
Normal file
@ -0,0 +1,17 @@
|
||||
FROM python:3.5-alpine
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
||||
|
||||
USER root
|
||||
|
||||
RUN apk add --no-cache build-base
|
||||
|
||||
RUN python -m pip --quiet --no-cache-dir install \
|
||||
ipyparallel
|
||||
|
||||
RUN ipython profile create --parallel --profile=default
|
||||
|
||||
COPY ipcontroller-client.json /root/.ipython/profile_default/security/ipcontroller-client.json
|
||||
COPY ipcontroller-engine.json /root/.ipython/profile_default/security/ipcontroller-engine.json
|
||||
|
||||
CMD ["sh","-c","ipcontroller --ip=* --reuse"]
|
23
ipython/Dockerfile.engine
Normal file
23
ipython/Dockerfile.engine
Normal file
@ -0,0 +1,23 @@
|
||||
FROM python:3.5-alpine
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
||||
|
||||
USER root
|
||||
|
||||
RUN apk add --no-cache build-base
|
||||
|
||||
RUN python -m pip --quiet --no-cache-dir install \
|
||||
ipyparallel \
|
||||
numpy \
|
||||
pandas \
|
||||
pymongo \
|
||||
redis \
|
||||
requests \
|
||||
bs4
|
||||
|
||||
RUN ipython profile create --parallel --profile=default
|
||||
|
||||
COPY ipcontroller-client.json /root/.ipython/profile_default/security/ipcontroller-client.json
|
||||
COPY ipcontroller-engine.json /root/.ipython/profile_default/security/ipcontroller-engine.json
|
||||
|
||||
CMD ["sh","-c","ipcluster engines"]
|
16
ipython/ipcontroller-client.json
Normal file
16
ipython/ipcontroller-client.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"key": "868074dd-060311910ab3d6991611bccf",
|
||||
"signature_scheme": "hmac-sha256",
|
||||
"unpack": "json",
|
||||
"pack": "json",
|
||||
"ssh": "",
|
||||
"task_scheme": "leastload",
|
||||
"interface": "tcp://*",
|
||||
"location": "laradock-ipython",
|
||||
"notification": 33338,
|
||||
"iopub": 33337,
|
||||
"control": 33336,
|
||||
"mux": 33335,
|
||||
"task": 33334,
|
||||
"registration": 33333
|
||||
}
|
16
ipython/ipcontroller-engine.json
Normal file
16
ipython/ipcontroller-engine.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"key": "868074dd-060311910ab3d6991611bccf",
|
||||
"signature_scheme": "hmac-sha256",
|
||||
"unpack": "json",
|
||||
"pack": "json",
|
||||
"ssh": "",
|
||||
"interface": "tcp://*",
|
||||
"location": "laradock-ipython",
|
||||
"iopub": 33327,
|
||||
"hb_ping": 33328,
|
||||
"hb_pong": 33329,
|
||||
"control": 33330,
|
||||
"mux": 33331,
|
||||
"task": 33332,
|
||||
"registration": 33333
|
||||
}
|
@ -93,7 +93,7 @@ docker run --name myjenkins -p 8080:8080 -p 50000:50000 --env JAVA_OPTS="-Djava.
|
||||
```
|
||||
|
||||
# Configuring reverse proxy
|
||||
If you want to install Jenkins behind a reverse proxy with prefix, example: mysite.com/jenkins, you need to add environnement variable `JENKINS_OPTS="--prefix=/jenkins"` and then follow the below procedures to configure your reverse proxy, which will depend if you have Apache ou Nginx:
|
||||
If you want to install Jenkins behind a reverse proxy with prefix, example: mysite.com/jenkins, you need to add environment variable `JENKINS_OPTS="--prefix=/jenkins"` and then follow the below procedures to configure your reverse proxy, which will depend if you have Apache ou Nginx:
|
||||
- [Apache](https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache)
|
||||
- [Nginx](https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy)
|
||||
|
||||
@ -154,7 +154,7 @@ COPY custom.groovy /usr/share/jenkins/ref/init.groovy.d/custom.groovy
|
||||
## Preinstalling plugins
|
||||
|
||||
You can rely on the `install-plugins.sh` script to pass a set of plugins to download with their dependencies.
|
||||
Use plugin artifact ID, whithout `-plugin` extension, and append the version if needed separated by `:`.
|
||||
Use plugin artifact ID, without `-plugin` extension, and append the version if needed separated by `:`.
|
||||
Dependencies that are already included in the Jenkins war will only be downloaded if their required version is newer than the one included.
|
||||
|
||||
```
|
||||
|
26
jupyterhub/Dockerfile
Normal file
26
jupyterhub/Dockerfile
Normal file
@ -0,0 +1,26 @@
|
||||
FROM python
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
||||
|
||||
ENV JUPYTERHUB_USER_DATA ${JUPYTERHUB_USER_DATA}
|
||||
ENV JUPYTERHUB_POSTGRES_DB ${JUPYTERHUB_POSTGRES_DB}
|
||||
ENV JUPYTERHUB_POSTGRES_USER ${JUPYTERHUB_POSTGRES_USER}
|
||||
ENV JUPYTERHUB_POSTGRES_HOST ${JUPYTERHUB_POSTGRES_HOST}
|
||||
ENV JUPYTERHUB_POSTGRES_PASSWORD ${JUPYTERHUB_POSTGRES_PASSWORD}
|
||||
ENV JUPYTERHUB_OAUTH_CALLBACK_URL ${JUPYTERHUB_OAUTH_CALLBACK_URL}
|
||||
ENV JUPYTERHUB_OAUTH_CLIENT_ID ${JUPYTERHUB_OAUTH_CLIENT_ID}
|
||||
ENV JUPYTERHUB_OAUTH_CLIENT_SECRET ${JUPYTERHUB_OAUTH_CLIENT_SECRET}
|
||||
ENV JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE ${JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE}
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
|
||||
|
||||
RUN apt update -yqq && \
|
||||
apt-get install -y nodejs
|
||||
|
||||
RUN npm install -g configurable-http-proxy
|
||||
|
||||
RUN pip install jupyterhub
|
||||
RUN pip install oauthenticator
|
||||
RUN pip install dockerspawner
|
||||
RUN pip install psycopg2 psycopg2-binary
|
||||
|
||||
CMD ["sh", "-c", "jupyterhub upgrade-db && jupyterhub -f /jupyterhub_config.py"]
|
72
jupyterhub/Dockerfile.user
Normal file
72
jupyterhub/Dockerfile.user
Normal file
@ -0,0 +1,72 @@
|
||||
FROM tensorflow/tensorflow:latest-gpu
|
||||
|
||||
MAINTAINER ahkui <ahkui@outlook.com>
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python \
|
||||
python-dev \
|
||||
&& \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
wget \
|
||||
git \
|
||||
&& \
|
||||
apt-get autoremove -y && \
|
||||
apt-get autoclean && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
|
||||
python3 get-pip.py && \
|
||||
rm get-pip.py
|
||||
|
||||
RUN python3 -m pip --quiet --no-cache-dir install \
|
||||
Pillow \
|
||||
h5py \
|
||||
ipykernel \
|
||||
jupyter \
|
||||
notebook \
|
||||
jupyterhub \
|
||||
matplotlib \
|
||||
numpy \
|
||||
pandas \
|
||||
scipy \
|
||||
sklearn \
|
||||
Flask \
|
||||
gunicorn \
|
||||
pymongo \
|
||||
redis \
|
||||
requests \
|
||||
ipyparallel \
|
||||
bs4 \
|
||||
&& \
|
||||
python3 -m ipykernel.kernelspec
|
||||
|
||||
RUN pip --no-cache-dir install \
|
||||
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.8.0-cp35-cp35m-linux_x86_64.whl
|
||||
|
||||
RUN ln -s -f /usr/bin/python3 /usr/bin/python
|
||||
|
||||
COPY start.sh /usr/local/bin/
|
||||
COPY start-notebook.sh /usr/local/bin/
|
||||
COPY start-singleuser.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/start.sh
|
||||
RUN chmod +x /usr/local/bin/start-notebook.sh
|
||||
RUN chmod +x /usr/local/bin/start-singleuser.sh
|
||||
|
||||
RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.10.0/tini && \
|
||||
mv tini /usr/local/bin/tini && \
|
||||
chmod +x /usr/local/bin/tini
|
||||
|
||||
# cleanup
|
||||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
|
||||
CMD ["start-notebook.sh"]
|
||||
|
||||
|
121
jupyterhub/jupyterhub_config.py
Normal file
121
jupyterhub/jupyterhub_config.py
Normal file
@ -0,0 +1,121 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
# Configuration file for JupyterHub
|
||||
import os
|
||||
|
||||
c = get_config()
|
||||
|
||||
def create_dir_hook(spawner):
|
||||
username = spawner.user.name # get the username
|
||||
volume_path = os.path.join('/user-data', username)
|
||||
if not os.path.exists(volume_path):
|
||||
# create a directory with umask 0755
|
||||
# hub and container user must have the same UID to be writeable
|
||||
# still readable by other users on the system
|
||||
os.mkdir(volume_path, 0o755)
|
||||
os.chown(volume_path, 1000,100)
|
||||
# now do whatever you think your user needs
|
||||
# ...
|
||||
pass
|
||||
|
||||
# attach the hook function to the spawner
|
||||
c.Spawner.pre_spawn_hook = create_dir_hook
|
||||
|
||||
# We rely on environment variables to configure JupyterHub so that we
|
||||
# avoid having to rebuild the JupyterHub container every time we change a
|
||||
# configuration parameter.
|
||||
|
||||
# Spawn single-user servers as Docker containers
|
||||
c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'
|
||||
|
||||
# Spawn containers from this image
|
||||
c.DockerSpawner.image = os.environ['JUPYTERHUB_LOCAL_NOTEBOOK_IMAGE']
|
||||
|
||||
# JupyterHub requires a single-user instance of the Notebook server, so we
|
||||
# default to using the `start-singleuser.sh` script included in the
|
||||
# jupyter/docker-stacks *-notebook images as the Docker run command when
|
||||
# spawning containers. Optionally, you can override the Docker run command
|
||||
# using the DOCKER_SPAWN_CMD environment variable.
|
||||
spawn_cmd = os.environ.get('JUPYTERHUB_DOCKER_SPAWN_CMD', "start-singleuser.sh")
|
||||
c.DockerSpawner.extra_create_kwargs.update({ 'command': spawn_cmd })
|
||||
|
||||
# Connect containers to this Docker network
|
||||
network_name = os.environ.get('JUPYTERHUB_NETWORK_NAME','laradock_backend')
|
||||
c.DockerSpawner.use_internal_ip = True
|
||||
c.DockerSpawner.network_name = network_name
|
||||
|
||||
# Pass the network name as argument to spawned containers
|
||||
c.DockerSpawner.extra_host_config = { 'network_mode': network_name, 'runtime': 'nvidia' }
|
||||
# c.DockerSpawner.extra_host_config = { 'network_mode': network_name, "devices":["/dev/nvidiactl","/dev/nvidia-uvm","/dev/nvidia0"] }
|
||||
# Explicitly set notebook directory because we'll be mounting a host volume to
|
||||
# it. Most jupyter/docker-stacks *-notebook images run the Notebook server as
|
||||
# user `jovyan`, and set the notebook directory to `/home/jovyan/work`.
|
||||
# We follow the same convention.
|
||||
# notebook_dir = os.environ.get('JUPYTERHUB_DOCKER_NOTEBOOK_DIR') or '/home/jovyan/work'
|
||||
notebook_dir = '/notebooks'
|
||||
c.DockerSpawner.notebook_dir = notebook_dir
|
||||
|
||||
# Mount the real user's Docker volume on the host to the notebook user's
|
||||
# notebook directory in the container
|
||||
user_data = os.environ.get('JUPYTERHUB_USER_DATA','/jupyterhub')
|
||||
c.DockerSpawner.volumes = {
|
||||
user_data+'/{username}': notebook_dir
|
||||
}
|
||||
|
||||
c.DockerSpawner.extra_create_kwargs.update({ 'user': 'root'})
|
||||
|
||||
# volume_driver is no longer a keyword argument to create_container()
|
||||
# c.DockerSpawner.extra_create_kwargs.update({ 'volume_driver': 'local' })
|
||||
# Remove containers once they are stopped
|
||||
c.DockerSpawner.remove_containers = True
|
||||
|
||||
# For debugging arguments passed to spawned containers
|
||||
c.DockerSpawner.debug = True
|
||||
|
||||
# User containers will access hub by container name on the Docker network
|
||||
c.JupyterHub.hub_ip = 'jupyterhub'
|
||||
c.JupyterHub.hub_port = 8000
|
||||
|
||||
# TLS config
|
||||
c.JupyterHub.port = 80
|
||||
# c.JupyterHub.ssl_key = os.environ['SSL_KEY']
|
||||
# c.JupyterHub.ssl_cert = os.environ['SSL_CERT']
|
||||
|
||||
# Authenticate users with GitHub OAuth
|
||||
c.JupyterHub.authenticator_class = 'oauthenticator.GitHubOAuthenticator'
|
||||
c.GitHubOAuthenticator.oauth_callback_url = os.environ['JUPYTERHUB_OAUTH_CALLBACK_URL']
|
||||
c.GitHubOAuthenticator.client_id = os.environ['JUPYTERHUB_OAUTH_CLIENT_ID']
|
||||
c.GitHubOAuthenticator.client_secret = os.environ['JUPYTERHUB_OAUTH_CLIENT_SECRET']
|
||||
|
||||
# Persist hub data on volume mounted inside container
|
||||
data_dir = '/data'
|
||||
|
||||
c.JupyterHub.cookie_secret_file = os.path.join(data_dir,
|
||||
'jupyterhub_cookie_secret')
|
||||
|
||||
print(os.environ)
|
||||
|
||||
c.JupyterHub.db_url = 'postgresql://{user}:{password}@{host}/{db}'.format(
|
||||
user=os.environ['JUPYTERHUB_POSTGRES_USER'],
|
||||
host=os.environ['JUPYTERHUB_POSTGRES_HOST'],
|
||||
password=os.environ['JUPYTERHUB_POSTGRES_PASSWORD'],
|
||||
db=os.environ['JUPYTERHUB_POSTGRES_DB'],
|
||||
)
|
||||
|
||||
# Whitlelist users and admins
|
||||
c.Authenticator.whitelist = whitelist = set()
|
||||
c.Authenticator.admin_users = admin = set()
|
||||
c.JupyterHub.admin_access = True
|
||||
pwd = os.path.dirname(__file__)
|
||||
with open(os.path.join(pwd, 'userlist')) as f:
|
||||
for line in f:
|
||||
if not line:
|
||||
continue
|
||||
parts = line.split()
|
||||
name = parts[0]
|
||||
print(name)
|
||||
whitelist.add(name)
|
||||
if len(parts) > 1 and parts[1] == 'admin':
|
||||
admin.add(name)
|
||||
admin.add('laradock')
|
12
jupyterhub/start-notebook.sh
Normal file
12
jupyterhub/start-notebook.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
set -e
|
||||
|
||||
if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
|
||||
# launched by JupyterHub, use single-user entrypoint
|
||||
exec /usr/local/bin/start-singleuser.sh $*
|
||||
else
|
||||
. /usr/local/bin/start.sh jupyter notebook $*
|
||||
fi
|
40
jupyterhub/start-singleuser.sh
Normal file
40
jupyterhub/start-singleuser.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
set -e
|
||||
|
||||
# set default ip to 0.0.0.0
|
||||
if [[ "$NOTEBOOK_ARGS $@" != *"--ip="* ]]; then
|
||||
NOTEBOOK_ARGS="--ip=0.0.0.0 $NOTEBOOK_ARGS"
|
||||
fi
|
||||
|
||||
# handle some deprecated environment variables
|
||||
# from DockerSpawner < 0.8.
|
||||
# These won't be passed from DockerSpawner 0.9,
|
||||
# so avoid specifying --arg=empty-string
|
||||
# if [ ! -z "$NOTEBOOK_DIR" ]; then
|
||||
# NOTEBOOK_ARGS="--notebook-dir='$NOTEBOOK_DIR' $NOTEBOOK_ARGS"
|
||||
# fi
|
||||
if [ ! -z "$JPY_PORT" ]; then
|
||||
NOTEBOOK_ARGS="--port=$JPY_PORT $NOTEBOOK_ARGS"
|
||||
fi
|
||||
if [ ! -z "$JPY_USER" ]; then
|
||||
NOTEBOOK_ARGS="--user=$JPY_USER $NOTEBOOK_ARGS"
|
||||
fi
|
||||
if [ ! -z "$JPY_COOKIE_NAME" ]; then
|
||||
NOTEBOOK_ARGS="--cookie-name=$JPY_COOKIE_NAME $NOTEBOOK_ARGS"
|
||||
fi
|
||||
if [ ! -z "$JPY_BASE_URL" ]; then
|
||||
NOTEBOOK_ARGS="--base-url=$JPY_BASE_URL $NOTEBOOK_ARGS"
|
||||
fi
|
||||
if [ ! -z "$JPY_HUB_PREFIX" ]; then
|
||||
NOTEBOOK_ARGS="--hub-prefix=$JPY_HUB_PREFIX $NOTEBOOK_ARGS"
|
||||
fi
|
||||
if [ ! -z "$JPY_HUB_API_URL" ]; then
|
||||
NOTEBOOK_ARGS="--hub-api-url=$JPY_HUB_API_URL $NOTEBOOK_ARGS"
|
||||
fi
|
||||
|
||||
NOTEBOOK_ARGS=" --allow-root --notebook-dir='/notebooks' $NOTEBOOK_ARGS"
|
||||
|
||||
. /usr/local/bin/start.sh jupyterhub-singleuser $NOTEBOOK_ARGS $@
|
7
jupyterhub/start.sh
Normal file
7
jupyterhub/start.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
set -e
|
||||
|
||||
exec sh -c "env PATH=$PATH $*"
|
1
jupyterhub/userlist
Normal file
1
jupyterhub/userlist
Normal file
@ -0,0 +1 @@
|
||||
laradock
|
@ -1,3 +1,3 @@
|
||||
FROM docker.elastic.co/kibana/kibana:5.4.1
|
||||
FROM docker.elastic.co/kibana/kibana:6.2.3
|
||||
|
||||
EXPOSE 5601
|
||||
|
@ -4,7 +4,8 @@
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
FROM php:7.0-alpine
|
||||
ARG PHP_VERSION=${PHP_VERSION}
|
||||
FROM php:${PHP_VERSION}-alpine
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
@ -21,18 +22,51 @@ RUN apk --update add wget \
|
||||
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
|
||||
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
|
||||
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
|
||||
|
||||
#Install BCMath package:
|
||||
ARG INSTALL_BCMATH=false
|
||||
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||
docker-php-ext-install bcmath \
|
||||
;fi
|
||||
|
||||
# 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
|
||||
apk --update add postgresql-dev \
|
||||
&& docker-php-ext-install pdo_pgsql \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# PHP Memcached:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_MEMCACHED=false
|
||||
|
||||
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
||||
# Install the php memcached extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \
|
||||
else \
|
||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz"; \
|
||||
fi \
|
||||
&& mkdir -p memcached \
|
||||
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd memcached \
|
||||
&& phpize \
|
||||
&& ./configure \
|
||||
&& make -j$(nproc) \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm -r memcached \
|
||||
&& rm /tmp/memcached.tar.gz \
|
||||
&& docker-php-ext-enable memcached \
|
||||
;fi
|
||||
|
||||
RUN rm /var/cache/apk/* \
|
||||
&& mkdir -p /var/www
|
||||
&& mkdir -p /var/www
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
@ -54,7 +88,7 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
||||
#
|
||||
# If you need to modify this image, feel free to do it right here.
|
||||
#
|
||||
# -- Your awesome modifications go here -- #
|
||||
# -- Your awesome modifications go here -- #
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
@ -62,7 +96,7 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.0."
|
||||
RUN php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
10
laravel-horizon/supervisord.conf
Normal file
10
laravel-horizon/supervisord.conf
Normal file
@ -0,0 +1,10 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
[supervisorctl]
|
||||
[inet_http_server]
|
||||
port = 127.0.0.1:9001
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[include]
|
||||
files = supervisord.d/*.conf
|
1
laravel-horizon/supervisord.d/.gitignore
vendored
Normal file
1
laravel-horizon/supervisord.d/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.conf
|
@ -0,0 +1,6 @@
|
||||
[program:laravel-horizon]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php /var/www/artisan horizon
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
3
mongo-webui/Dockerfile
Normal file
3
mongo-webui/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM mongoclient/mongoclient
|
||||
|
||||
LABEL maintainer="ahkui <ahkui@outlook.com>"
|
5
mosquitto/Dockerfile
Normal file
5
mosquitto/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM eclipse-mosquitto:latest
|
||||
|
||||
LABEL maintainer="Luis Coutinho <luis@luiscoutinho.pt>"
|
||||
|
||||
COPY mosquitto.conf /mosquitto/config/
|
838
mosquitto/mosquitto.conf
Normal file
838
mosquitto/mosquitto.conf
Normal file
@ -0,0 +1,838 @@
|
||||
# Config file for mosquitto
|
||||
#
|
||||
# See mosquitto.conf(5) for more information.
|
||||
#
|
||||
# Default values are shown, uncomment to change.
|
||||
#
|
||||
# Use the # character to indicate a comment, but only if it is the
|
||||
# very first character on the line.
|
||||
|
||||
# =================================================================
|
||||
# General configuration
|
||||
# =================================================================
|
||||
|
||||
# Time in seconds to wait before resending an outgoing QoS=1 or
|
||||
# QoS=2 message.
|
||||
#retry_interval 20
|
||||
|
||||
# Time in seconds between updates of the $SYS tree.
|
||||
# Set to 0 to disable the publishing of the $SYS tree.
|
||||
#sys_interval 10
|
||||
|
||||
# Time in seconds between cleaning the internal message store of
|
||||
# unreferenced messages. Lower values will result in lower memory
|
||||
# usage but more processor time, higher values will have the
|
||||
# opposite effect.
|
||||
# Setting a value of 0 means the unreferenced messages will be
|
||||
# disposed of as quickly as possible.
|
||||
#store_clean_interval 10
|
||||
|
||||
# Write process id to a file. Default is a blank string which means
|
||||
# a pid file shouldn't be written.
|
||||
# This should be set to /var/run/mosquitto.pid if mosquitto is
|
||||
# being run automatically on boot with an init script and
|
||||
# start-stop-daemon or similar.
|
||||
#pid_file
|
||||
|
||||
# When run as root, drop privileges to this user and its primary
|
||||
# group.
|
||||
# Leave blank to stay as root, but this is not recommended.
|
||||
# If run as a non-root user, this setting has no effect.
|
||||
# Note that on Windows this has no effect and so mosquitto should
|
||||
# be started by the user you wish it to run as.
|
||||
#user mosquitto
|
||||
|
||||
# The maximum number of QoS 1 and 2 messages currently inflight per
|
||||
# client.
|
||||
# This includes messages that are partway through handshakes and
|
||||
# those that are being retried. Defaults to 20. Set to 0 for no
|
||||
# maximum. Setting to 1 will guarantee in-order delivery of QoS 1
|
||||
# and 2 messages.
|
||||
#max_inflight_messages 20
|
||||
|
||||
# The maximum number of QoS 1 and 2 messages to hold in a queue
|
||||
# above those that are currently in-flight. Defaults to 100. Set
|
||||
# to 0 for no maximum (not recommended).
|
||||
# See also queue_qos0_messages.
|
||||
#max_queued_messages 100
|
||||
|
||||
# Set to true to queue messages with QoS 0 when a persistent client is
|
||||
# disconnected. These messages are included in the limit imposed by
|
||||
# max_queued_messages.
|
||||
# Defaults to false.
|
||||
# This is a non-standard option for the MQTT v3.1 spec but is allowed in
|
||||
# v3.1.1.
|
||||
#queue_qos0_messages false
|
||||
|
||||
# This option sets the maximum publish payload size that the broker will allow.
|
||||
# Received messages that exceed this size will not be accepted by the broker.
|
||||
# The default value is 0, which means that all valid MQTT messages are
|
||||
# accepted. MQTT imposes a maximum payload size of 268435455 bytes.
|
||||
#message_size_limit 0
|
||||
|
||||
# This option controls whether a client is allowed to connect with a zero
|
||||
# length client id or not. This option only affects clients using MQTT v3.1.1
|
||||
# and later. If set to false, clients connecting with a zero length client id
|
||||
# are disconnected. If set to true, clients will be allocated a client id by
|
||||
# the broker. This means it is only useful for clients with clean session set
|
||||
# to true.
|
||||
#allow_zero_length_clientid true
|
||||
|
||||
# If allow_zero_length_clientid is true, this option allows you to set a prefix
|
||||
# to automatically generated client ids to aid visibility in logs.
|
||||
#auto_id_prefix
|
||||
|
||||
# This option allows persistent clients (those with clean session set to false)
|
||||
# to be removed if they do not reconnect within a certain time frame.
|
||||
#
|
||||
# This is a non-standard option in MQTT V3.1 but allowed in MQTT v3.1.1.
|
||||
#
|
||||
# Badly designed clients may set clean session to false whilst using a randomly
|
||||
# generated client id. This leads to persistent clients that will never
|
||||
# reconnect. This option allows these clients to be removed.
|
||||
#
|
||||
# The expiration period should be an integer followed by one of h d w m y for
|
||||
# hour, day, week, month and year respectively. For example
|
||||
#
|
||||
# persistent_client_expiration 2m
|
||||
# persistent_client_expiration 14d
|
||||
# persistent_client_expiration 1y
|
||||
#
|
||||
# The default if not set is to never expire persistent clients.
|
||||
#persistent_client_expiration
|
||||
|
||||
# If a client is subscribed to multiple subscriptions that overlap, e.g. foo/#
|
||||
# and foo/+/baz , then MQTT expects that when the broker receives a message on
|
||||
# a topic that matches both subscriptions, such as foo/bar/baz, then the client
|
||||
# should only receive the message once.
|
||||
# Mosquitto keeps track of which clients a message has been sent to in order to
|
||||
# meet this requirement. The allow_duplicate_messages option allows this
|
||||
# behaviour to be disabled, which may be useful if you have a large number of
|
||||
# clients subscribed to the same set of topics and are very concerned about
|
||||
# minimising memory usage.
|
||||
# It can be safely set to true if you know in advance that your clients will
|
||||
# never have overlapping subscriptions, otherwise your clients must be able to
|
||||
# correctly deal with duplicate messages even when then have QoS=2.
|
||||
#allow_duplicate_messages false
|
||||
|
||||
# The MQTT specification requires that the QoS of a message delivered to a
|
||||
# subscriber is never upgraded to match the QoS of the subscription. Enabling
|
||||
# this option changes this behaviour. If upgrade_outgoing_qos is set true,
|
||||
# messages sent to a subscriber will always match the QoS of its subscription.
|
||||
# This is a non-standard option explicitly disallowed by the spec.
|
||||
#upgrade_outgoing_qos false
|
||||
|
||||
# =================================================================
|
||||
# Default listener
|
||||
# =================================================================
|
||||
|
||||
# IP address/hostname to bind the default listener to. If not
|
||||
# given, the default listener will not be bound to a specific
|
||||
# address and so will be accessible to all network interfaces.
|
||||
# bind_address ip-address/host name
|
||||
#bind_address
|
||||
|
||||
# Port to use for the default listener.
|
||||
port 9001
|
||||
|
||||
# The maximum number of client connections to allow. This is
|
||||
# a per listener setting.
|
||||
# Default is -1, which means unlimited connections.
|
||||
# Note that other process limits mean that unlimited connections
|
||||
# are not really possible. Typically the default maximum number of
|
||||
# connections possible is around 1024.
|
||||
#max_connections -1
|
||||
|
||||
# Choose the protocol to use when listening.
|
||||
# This can be either mqtt or websockets.
|
||||
# Websockets support is currently disabled by default at compile time.
|
||||
# Certificate based TLS may be used with websockets, except that
|
||||
# only the cafile, certfile, keyfile and ciphers options are supported.
|
||||
protocol websockets
|
||||
|
||||
# When a listener is using the websockets protocol, it is possible to serve
|
||||
# http data as well. Set http_dir to a directory which contains the files you
|
||||
# wish to serve. If this option is not specified, then no normal http
|
||||
# connections will be possible.
|
||||
#http_dir
|
||||
|
||||
# Set use_username_as_clientid to true to replace the clientid that a client
|
||||
# connected with with its username. This allows authentication to be tied to
|
||||
# the clientid, which means that it is possible to prevent one client
|
||||
# disconnecting another by using the same clientid.
|
||||
# If a client connects with no username it will be disconnected as not
|
||||
# authorised when this option is set to true.
|
||||
# Do not use in conjunction with clientid_prefixes.
|
||||
# See also use_identity_as_username.
|
||||
#use_username_as_clientid
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Certificate based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# The following options can be used to enable SSL/TLS support for
|
||||
# this listener. Note that the recommended port for MQTT over TLS
|
||||
# is 8883, but this must be set manually.
|
||||
#
|
||||
# See also the mosquitto-tls man page.
|
||||
|
||||
# At least one of cafile or capath must be defined. They both
|
||||
# define methods of accessing the PEM encoded Certificate
|
||||
# Authority certificates that have signed your server certificate
|
||||
# and that you wish to trust.
|
||||
# cafile defines the path to a file containing the CA certificates.
|
||||
# capath defines a directory that will be searched for files
|
||||
# containing the CA certificates. For capath to work correctly, the
|
||||
# certificate files must have ".crt" as the file ending and you must run
|
||||
# "c_rehash <path to capath>" each time you add/remove a certificate.
|
||||
#cafile
|
||||
#capath
|
||||
|
||||
# Path to the PEM encoded server certificate.
|
||||
#certfile
|
||||
|
||||
# Path to the PEM encoded keyfile.
|
||||
#keyfile
|
||||
|
||||
# This option defines the version of the TLS protocol to use for this listener.
|
||||
# The default value allows v1.2, v1.1 and v1.0, if they are all supported by
|
||||
# the version of openssl that the broker was compiled against. For openssl >=
|
||||
# 1.0.1 the valid values are tlsv1.2 tlsv1.1 and tlsv1. For openssl < 1.0.1 the
|
||||
# valid values are tlsv1.
|
||||
#tls_version
|
||||
|
||||
# By default a TLS enabled listener will operate in a similar fashion to a
|
||||
# https enabled web server, in that the server has a certificate signed by a CA
|
||||
# and the client will verify that it is a trusted certificate. The overall aim
|
||||
# is encryption of the network traffic. By setting require_certificate to true,
|
||||
# the client must provide a valid certificate in order for the network
|
||||
# connection to proceed. This allows access to the broker to be controlled
|
||||
# outside of the mechanisms provided by MQTT.
|
||||
#require_certificate false
|
||||
|
||||
# If require_certificate is true, you may set use_identity_as_username to true
|
||||
# to use the CN value from the client certificate as a username. If this is
|
||||
# true, the password_file option will not be used for this listener.
|
||||
#use_identity_as_username false
|
||||
|
||||
# If you have require_certificate set to true, you can create a certificate
|
||||
# revocation list file to revoke access to particular client certificates. If
|
||||
# you have done this, use crlfile to point to the PEM encoded revocation file.
|
||||
#crlfile
|
||||
|
||||
# If you wish to control which encryption ciphers are used, use the ciphers
|
||||
# option. The list of available ciphers can be optained using the "openssl
|
||||
# ciphers" command and should be provided in the same format as the output of
|
||||
# that command.
|
||||
# If unset defaults to DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:@STRENGTH
|
||||
#ciphers DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:@STRENGTH
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Pre-shared-key based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# The following options can be used to enable PSK based SSL/TLS support for
|
||||
# this listener. Note that the recommended port for MQTT over TLS is 8883, but
|
||||
# this must be set manually.
|
||||
#
|
||||
# See also the mosquitto-tls man page and the "Certificate based SSL/TLS
|
||||
# support" section. Only one of certificate or PSK encryption support can be
|
||||
# enabled for any listener.
|
||||
|
||||
# The psk_hint option enables pre-shared-key support for this listener and also
|
||||
# acts as an identifier for this listener. The hint is sent to clients and may
|
||||
# be used locally to aid authentication. The hint is a free form string that
|
||||
# doesn't have much meaning in itself, so feel free to be creative.
|
||||
# If this option is provided, see psk_file to define the pre-shared keys to be
|
||||
# used or create a security plugin to handle them.
|
||||
#psk_hint
|
||||
|
||||
# Set use_identity_as_username to have the psk identity sent by the client used
|
||||
# as its username. Authentication will be carried out using the PSK rather than
|
||||
# the MQTT username/password and so password_file will not be used for this
|
||||
# listener.
|
||||
#use_identity_as_username false
|
||||
|
||||
# When using PSK, the encryption ciphers used will be chosen from the list of
|
||||
# available PSK ciphers. If you want to control which ciphers are available,
|
||||
# use the "ciphers" option. The list of available ciphers can be optained
|
||||
# using the "openssl ciphers" command and should be provided in the same format
|
||||
# as the output of that command.
|
||||
#ciphers
|
||||
|
||||
# =================================================================
|
||||
# Extra listeners
|
||||
# =================================================================
|
||||
|
||||
# Listen on a port/ip address combination. By using this variable
|
||||
# multiple times, mosquitto can listen on more than one port. If
|
||||
# this variable is used and neither bind_address nor port given,
|
||||
# then the default listener will not be started.
|
||||
# The port number to listen on must be given. Optionally, an ip
|
||||
# address or host name may be supplied as a second argument. In
|
||||
# this case, mosquitto will attempt to bind the listener to that
|
||||
# address and so restrict access to the associated network and
|
||||
# interface. By default, mosquitto will listen on all interfaces.
|
||||
# Note that for a websockets listener it is not possible to bind to a host
|
||||
# name.
|
||||
# listener port-number [ip address/host name]
|
||||
#listener
|
||||
|
||||
# The maximum number of client connections to allow. This is
|
||||
# a per listener setting.
|
||||
# Default is -1, which means unlimited connections.
|
||||
# Note that other process limits mean that unlimited connections
|
||||
# are not really possible. Typically the default maximum number of
|
||||
# connections possible is around 1024.
|
||||
#max_connections -1
|
||||
|
||||
# The listener can be restricted to operating within a topic hierarchy using
|
||||
# the mount_point option. This is achieved be prefixing the mount_point string
|
||||
# to all topics for any clients connected to this listener. This prefixing only
|
||||
# happens internally to the broker; the client will not see the prefix.
|
||||
#mount_point
|
||||
|
||||
# Choose the protocol to use when listening.
|
||||
# This can be either mqtt or websockets.
|
||||
# Certificate based TLS may be used with websockets, except that only the
|
||||
# cafile, certfile, keyfile and ciphers options are supported.
|
||||
#protocol mqtt
|
||||
|
||||
# When a listener is using the websockets protocol, it is possible to serve
|
||||
# http data as well. Set http_dir to a directory which contains the files you
|
||||
# wish to serve. If this option is not specified, then no normal http
|
||||
# connections will be possible.
|
||||
#http_dir
|
||||
|
||||
# Set use_username_as_clientid to true to replace the clientid that a client
|
||||
# connected with with its username. This allows authentication to be tied to
|
||||
# the clientid, which means that it is possible to prevent one client
|
||||
# disconnecting another by using the same clientid.
|
||||
# If a client connects with no username it will be disconnected as not
|
||||
# authorised when this option is set to true.
|
||||
# Do not use in conjunction with clientid_prefixes.
|
||||
# See also use_identity_as_username.
|
||||
#use_username_as_clientid
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Certificate based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# The following options can be used to enable certificate based SSL/TLS support
|
||||
# for this listener. Note that the recommended port for MQTT over TLS is 8883,
|
||||
# but this must be set manually.
|
||||
#
|
||||
# See also the mosquitto-tls man page and the "Pre-shared-key based SSL/TLS
|
||||
# support" section. Only one of certificate or PSK encryption support can be
|
||||
# enabled for any listener.
|
||||
|
||||
# At least one of cafile or capath must be defined to enable certificate based
|
||||
# TLS encryption. They both define methods of accessing the PEM encoded
|
||||
# Certificate Authority certificates that have signed your server certificate
|
||||
# and that you wish to trust.
|
||||
# cafile defines the path to a file containing the CA certificates.
|
||||
# capath defines a directory that will be searched for files
|
||||
# containing the CA certificates. For capath to work correctly, the
|
||||
# certificate files must have ".crt" as the file ending and you must run
|
||||
# "c_rehash <path to capath>" each time you add/remove a certificate.
|
||||
#cafile
|
||||
#capath
|
||||
|
||||
# Path to the PEM encoded server certificate.
|
||||
#certfile
|
||||
|
||||
# Path to the PEM encoded keyfile.
|
||||
#keyfile
|
||||
|
||||
# By default an TLS enabled listener will operate in a similar fashion to a
|
||||
# https enabled web server, in that the server has a certificate signed by a CA
|
||||
# and the client will verify that it is a trusted certificate. The overall aim
|
||||
# is encryption of the network traffic. By setting require_certificate to true,
|
||||
# the client must provide a valid certificate in order for the network
|
||||
# connection to proceed. This allows access to the broker to be controlled
|
||||
# outside of the mechanisms provided by MQTT.
|
||||
#require_certificate false
|
||||
|
||||
# If require_certificate is true, you may set use_identity_as_username to true
|
||||
# to use the CN value from the client certificate as a username. If this is
|
||||
# true, the password_file option will not be used for this listener.
|
||||
#use_identity_as_username false
|
||||
|
||||
# If you have require_certificate set to true, you can create a certificate
|
||||
# revocation list file to revoke access to particular client certificates. If
|
||||
# you have done this, use crlfile to point to the PEM encoded revocation file.
|
||||
#crlfile
|
||||
|
||||
# If you wish to control which encryption ciphers are used, use the ciphers
|
||||
# option. The list of available ciphers can be optained using the "openssl
|
||||
# ciphers" command and should be provided in the same format as the output of
|
||||
# that command.
|
||||
#ciphers
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Pre-shared-key based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# The following options can be used to enable PSK based SSL/TLS support for
|
||||
# this listener. Note that the recommended port for MQTT over TLS is 8883, but
|
||||
# this must be set manually.
|
||||
#
|
||||
# See also the mosquitto-tls man page and the "Certificate based SSL/TLS
|
||||
# support" section. Only one of certificate or PSK encryption support can be
|
||||
# enabled for any listener.
|
||||
|
||||
# The psk_hint option enables pre-shared-key support for this listener and also
|
||||
# acts as an identifier for this listener. The hint is sent to clients and may
|
||||
# be used locally to aid authentication. The hint is a free form string that
|
||||
# doesn't have much meaning in itself, so feel free to be creative.
|
||||
# If this option is provided, see psk_file to define the pre-shared keys to be
|
||||
# used or create a security plugin to handle them.
|
||||
#psk_hint
|
||||
|
||||
# Set use_identity_as_username to have the psk identity sent by the client used
|
||||
# as its username. Authentication will be carried out using the PSK rather than
|
||||
# the MQTT username/password and so password_file will not be used for this
|
||||
# listener.
|
||||
#use_identity_as_username false
|
||||
|
||||
# When using PSK, the encryption ciphers used will be chosen from the list of
|
||||
# available PSK ciphers. If you want to control which ciphers are available,
|
||||
# use the "ciphers" option. The list of available ciphers can be optained
|
||||
# using the "openssl ciphers" command and should be provided in the same format
|
||||
# as the output of that command.
|
||||
#ciphers
|
||||
|
||||
# =================================================================
|
||||
# Persistence
|
||||
# =================================================================
|
||||
|
||||
# If persistence is enabled, save the in-memory database to disk
|
||||
# every autosave_interval seconds. If set to 0, the persistence
|
||||
# database will only be written when mosquitto exits. See also
|
||||
# autosave_on_changes.
|
||||
# Note that writing of the persistence database can be forced by
|
||||
# sending mosquitto a SIGUSR1 signal.
|
||||
#autosave_interval 1800
|
||||
|
||||
# If true, mosquitto will count the number of subscription changes, retained
|
||||
# messages received and queued messages and if the total exceeds
|
||||
# autosave_interval then the in-memory database will be saved to disk.
|
||||
# If false, mosquitto will save the in-memory database to disk by treating
|
||||
# autosave_interval as a time in seconds.
|
||||
#autosave_on_changes false
|
||||
|
||||
# Save persistent message data to disk (true/false).
|
||||
# This saves information about all messages, including
|
||||
# subscriptions, currently in-flight messages and retained
|
||||
# messages.
|
||||
# retained_persistence is a synonym for this option.
|
||||
persistence true
|
||||
|
||||
# The filename to use for the persistent database, not including
|
||||
# the path.
|
||||
#persistence_file mosquitto.db
|
||||
|
||||
# Location for persistent database. Must include trailing /
|
||||
# Default is an empty string (current directory).
|
||||
# Set to e.g. /var/lib/mosquitto/ if running as a proper service on Linux or
|
||||
# similar.
|
||||
persistence_location /mosquitto/data/
|
||||
|
||||
# =================================================================
|
||||
# Logging
|
||||
# =================================================================
|
||||
|
||||
# Places to log to. Use multiple log_dest lines for multiple
|
||||
# logging destinations.
|
||||
# Possible destinations are: stdout stderr syslog topic file
|
||||
#
|
||||
# stdout and stderr log to the console on the named output.
|
||||
#
|
||||
# syslog uses the userspace syslog facility which usually ends up
|
||||
# in /var/log/messages or similar.
|
||||
#
|
||||
# topic logs to the broker topic '$SYS/broker/log/<severity>',
|
||||
# where severity is one of D, E, W, N, I, M which are debug, error,
|
||||
# warning, notice, information and message. Message type severity is used by
|
||||
# the subscribe/unsubscribe log_types and publishes log messages to
|
||||
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe.
|
||||
#
|
||||
# The file destination requires an additional parameter which is the file to be
|
||||
# logged to, e.g. "log_dest file /var/log/mosquitto.log". The file will be
|
||||
# closed and reopened when the broker receives a HUP signal. Only a single file
|
||||
# destination may be configured.
|
||||
#
|
||||
# Note that if the broker is running as a Windows service it will default to
|
||||
# "log_dest none" and neither stdout nor stderr logging is available.
|
||||
# Use "log_dest none" if you wish to disable logging.
|
||||
log_dest file /mosquitto/log/mosquitto.log
|
||||
|
||||
# If using syslog logging (not on Windows), messages will be logged to the
|
||||
# "daemon" facility by default. Use the log_facility option to choose which of
|
||||
# local0 to local7 to log to instead. The option value should be an integer
|
||||
# value, e.g. "log_facility 5" to use local5.
|
||||
#log_facility
|
||||
|
||||
# Types of messages to log. Use multiple log_type lines for logging
|
||||
# multiple types of messages.
|
||||
# Possible types are: debug, error, warning, notice, information,
|
||||
# none, subscribe, unsubscribe, websockets, all.
|
||||
# Note that debug type messages are for decoding the incoming/outgoing
|
||||
# network packets. They are not logged in "topics".
|
||||
log_type error
|
||||
log_type warning
|
||||
log_type notice
|
||||
log_type information
|
||||
log_type all
|
||||
|
||||
# Change the websockets logging level. This is a global option, it is not
|
||||
# possible to set per listener. This is an integer that is interpreted by
|
||||
# libwebsockets as a bit mask for its lws_log_levels enum. See the
|
||||
# libwebsockets documentation for more details. "log_type websockets" must also
|
||||
# be enabled.
|
||||
#websockets_log_level 0
|
||||
|
||||
# If set to true, client connection and disconnection messages will be included
|
||||
# in the log.
|
||||
#connection_messages true
|
||||
|
||||
# If set to true, add a timestamp value to each log message.
|
||||
#log_timestamp true
|
||||
|
||||
# =================================================================
|
||||
# Security
|
||||
# =================================================================
|
||||
|
||||
# If set, only clients that have a matching prefix on their
|
||||
# clientid will be allowed to connect to the broker. By default,
|
||||
# all clients may connect.
|
||||
# For example, setting "secure-" here would mean a client "secure-
|
||||
# client" could connect but another with clientid "mqtt" couldn't.
|
||||
#clientid_prefixes
|
||||
|
||||
# Boolean value that determines whether clients that connect
|
||||
# without providing a username are allowed to connect. If set to
|
||||
# false then a password file should be created (see the
|
||||
# password_file option) to control authenticated client access.
|
||||
# Defaults to true.
|
||||
#allow_anonymous true
|
||||
|
||||
# In addition to the clientid_prefixes, allow_anonymous and TLS
|
||||
# authentication options, username based authentication is also
|
||||
# possible. The default support is described in "Default
|
||||
# authentication and topic access control" below. The auth_plugin
|
||||
# allows another authentication method to be used.
|
||||
# Specify the path to the loadable plugin and see the
|
||||
# "Authentication and topic access plugin options" section below.
|
||||
#auth_plugin
|
||||
|
||||
# If auth_plugin_deny_special_chars is true, the default, then before an ACL
|
||||
# check is made, the username/client id of the client needing the check is
|
||||
# searched for the presence of either a '+' or '#' character. If either of
|
||||
# these characters is found in either the username or client id, then the ACL
|
||||
# check is denied before it is sent to the plugin.o
|
||||
#
|
||||
# This check prevents the case where a malicious user could circumvent an ACL
|
||||
# check by using one of these characters as their username or client id. This
|
||||
# is the same issue as was reported with mosquitto itself as CVE-2017-7650.
|
||||
#
|
||||
# If you are entirely sure that the plugin you are using is not vulnerable to
|
||||
# this attack (i.e. if you never use usernames or client ids in topics) then
|
||||
# you can disable this extra check and have all ACL checks delivered to your
|
||||
# plugin by setting auth_plugin_deny_special_chars to false.
|
||||
#auth_plugin_deny_special_chars true
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Default authentication and topic access control
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
# Control access to the broker using a password file. This file can be
|
||||
# generated using the mosquitto_passwd utility. If TLS support is not compiled
|
||||
# into mosquitto (it is recommended that TLS support should be included) then
|
||||
# plain text passwords are used, in which case the file should be a text file
|
||||
# with lines in the format:
|
||||
# username:password
|
||||
# The password (and colon) may be omitted if desired, although this
|
||||
# offers very little in the way of security.
|
||||
#
|
||||
# See the TLS client require_certificate and use_identity_as_username options
|
||||
# for alternative authentication options.
|
||||
#password_file
|
||||
|
||||
# Access may also be controlled using a pre-shared-key file. This requires
|
||||
# TLS-PSK support and a listener configured to use it. The file should be text
|
||||
# lines in the format:
|
||||
# identity:key
|
||||
# The key should be in hexadecimal format without a leading "0x".
|
||||
#psk_file
|
||||
|
||||
# Control access to topics on the broker using an access control list
|
||||
# file. If this parameter is defined then only the topics listed will
|
||||
# have access.
|
||||
# If the first character of a line of the ACL file is a # it is treated as a
|
||||
# comment.
|
||||
# Topic access is added with lines of the format:
|
||||
#
|
||||
# topic [read|write|readwrite] <topic>
|
||||
#
|
||||
# The access type is controlled using "read", "write" or "readwrite". This
|
||||
# parameter is optional (unless <topic> contains a space character) - if not
|
||||
# given then the access is read/write. <topic> can contain the + or #
|
||||
# wildcards as in subscriptions.
|
||||
#
|
||||
# The first set of topics are applied to anonymous clients, assuming
|
||||
# allow_anonymous is true. User specific topic ACLs are added after a
|
||||
# user line as follows:
|
||||
#
|
||||
# user <username>
|
||||
#
|
||||
# The username referred to here is the same as in password_file. It is
|
||||
# not the clientid.
|
||||
#
|
||||
#
|
||||
# If is also possible to define ACLs based on pattern substitution within the
|
||||
# topic. The patterns available for substition are:
|
||||
#
|
||||
# %c to match the client id of the client
|
||||
# %u to match the username of the client
|
||||
#
|
||||
# The substitution pattern must be the only text for that level of hierarchy.
|
||||
#
|
||||
# The form is the same as for the topic keyword, but using pattern as the
|
||||
# keyword.
|
||||
# Pattern ACLs apply to all users even if the "user" keyword has previously
|
||||
# been given.
|
||||
#
|
||||
# If using bridges with usernames and ACLs, connection messages can be allowed
|
||||
# with the following pattern:
|
||||
# pattern write $SYS/broker/connection/%c/state
|
||||
#
|
||||
# pattern [read|write|readwrite] <topic>
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# pattern write sensor/%u/data
|
||||
#
|
||||
#acl_file
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Authentication and topic access plugin options
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
# If the auth_plugin option above is used, define options to pass to the
|
||||
# plugin here as described by the plugin instructions. All options named
|
||||
# using the format auth_opt_* will be passed to the plugin, for example:
|
||||
#
|
||||
# auth_opt_db_host
|
||||
# auth_opt_db_port
|
||||
# auth_opt_db_username
|
||||
# auth_opt_db_password
|
||||
|
||||
|
||||
# =================================================================
|
||||
# Bridges
|
||||
# =================================================================
|
||||
|
||||
# A bridge is a way of connecting multiple MQTT brokers together.
|
||||
# Create a new bridge using the "connection" option as described below. Set
|
||||
# options for the bridges using the remaining parameters. You must specify the
|
||||
# address and at least one topic to subscribe to.
|
||||
# Each connection must have a unique name.
|
||||
# The address line may have multiple host address and ports specified. See
|
||||
# below in the round_robin description for more details on bridge behaviour if
|
||||
# multiple addresses are used.
|
||||
# The direction that the topic will be shared can be chosen by
|
||||
# specifying out, in or both, where the default value is out.
|
||||
# The QoS level of the bridged communication can be specified with the next
|
||||
# topic option. The default QoS level is 0, to change the QoS the topic
|
||||
# direction must also be given.
|
||||
# The local and remote prefix options allow a topic to be remapped when it is
|
||||
# bridged to/from the remote broker. This provides the ability to place a topic
|
||||
# tree in an appropriate location.
|
||||
# For more details see the mosquitto.conf man page.
|
||||
# Multiple topics can be specified per connection, but be careful
|
||||
# not to create any loops.
|
||||
# If you are using bridges with cleansession set to false (the default), then
|
||||
# you may get unexpected behaviour from incoming topics if you change what
|
||||
# topics you are subscribing to. This is because the remote broker keeps the
|
||||
# subscription for the old topic. If you have this problem, connect your bridge
|
||||
# with cleansession set to true, then reconnect with cleansession set to false
|
||||
# as normal.
|
||||
#connection <name>
|
||||
#address <host>[:<port>] [<host>[:<port>]]
|
||||
#topic <topic> [[[out | in | both] qos-level] local-prefix remote-prefix]
|
||||
|
||||
# Set the version of the MQTT protocol to use with for this bridge. Can be one
|
||||
# of mqttv31 or mqttv311. Defaults to mqttv31.
|
||||
#bridge_protocol_version mqttv31
|
||||
|
||||
# If a bridge has topics that have "out" direction, the default behaviour is to
|
||||
# send an unsubscribe request to the remote broker on that topic. This means
|
||||
# that changing a topic direction from "in" to "out" will not keep receiving
|
||||
# incoming messages. Sending these unsubscribe requests is not always
|
||||
# desirable, setting bridge_attempt_unsubscribe to false will disable sending
|
||||
# the unsubscribe request.
|
||||
#bridge_attempt_unsubscribe true
|
||||
|
||||
# If the bridge has more than one address given in the address/addresses
|
||||
# configuration, the round_robin option defines the behaviour of the bridge on
|
||||
# a failure of the bridge connection. If round_robin is false, the default
|
||||
# value, then the first address is treated as the main bridge connection. If
|
||||
# the connection fails, the other secondary addresses will be attempted in
|
||||
# turn. Whilst connected to a secondary bridge, the bridge will periodically
|
||||
# attempt to reconnect to the main bridge until successful.
|
||||
# If round_robin is true, then all addresses are treated as equals. If a
|
||||
# connection fails, the next address will be tried and if successful will
|
||||
# remain connected until it fails
|
||||
#round_robin false
|
||||
|
||||
# Set the client id to use on the remote end of this bridge connection. If not
|
||||
# defined, this defaults to 'name.hostname' where name is the connection name
|
||||
# and hostname is the hostname of this computer.
|
||||
# This replaces the old "clientid" option to avoid confusion. "clientid"
|
||||
# remains valid for the time being.
|
||||
#remote_clientid
|
||||
|
||||
# Set the clientid to use on the local broker. If not defined, this defaults to
|
||||
# 'local.<clientid>'. If you are bridging a broker to itself, it is important
|
||||
# that local_clientid and clientid do not match.
|
||||
#local_clientid
|
||||
|
||||
# Set the clean session variable for this bridge.
|
||||
# When set to true, when the bridge disconnects for any reason, all
|
||||
# messages and subscriptions will be cleaned up on the remote
|
||||
# broker. Note that with cleansession set to true, there may be a
|
||||
# significant amount of retained messages sent when the bridge
|
||||
# reconnects after losing its connection.
|
||||
# When set to false, the subscriptions and messages are kept on the
|
||||
# remote broker, and delivered when the bridge reconnects.
|
||||
#cleansession false
|
||||
|
||||
# If set to true, publish notification messages to the local and remote brokers
|
||||
# giving information about the state of the bridge connection. Retained
|
||||
# messages are published to the topic $SYS/broker/connection/<clientid>/state
|
||||
# unless the notification_topic option is used.
|
||||
# If the message is 1 then the connection is active, or 0 if the connection has
|
||||
# failed.
|
||||
#notifications true
|
||||
|
||||
# Choose the topic on which notification messages for this bridge are
|
||||
# published. If not set, messages are published on the topic
|
||||
# $SYS/broker/connection/<clientid>/state
|
||||
#notification_topic
|
||||
|
||||
# Set the keepalive interval for this bridge connection, in
|
||||
# seconds.
|
||||
#keepalive_interval 60
|
||||
|
||||
# Set the start type of the bridge. This controls how the bridge starts and
|
||||
# can be one of three types: automatic, lazy and once. Note that RSMB provides
|
||||
# a fourth start type "manual" which isn't currently supported by mosquitto.
|
||||
#
|
||||
# "automatic" is the default start type and means that the bridge connection
|
||||
# will be started automatically when the broker starts and also restarted
|
||||
# after a short delay (30 seconds) if the connection fails.
|
||||
#
|
||||
# Bridges using the "lazy" start type will be started automatically when the
|
||||
# number of queued messages exceeds the number set with the "threshold"
|
||||
# parameter. It will be stopped automatically after the time set by the
|
||||
# "idle_timeout" parameter. Use this start type if you wish the connection to
|
||||
# only be active when it is needed.
|
||||
#
|
||||
# A bridge using the "once" start type will be started automatically when the
|
||||
# broker starts but will not be restarted if the connection fails.
|
||||
#start_type automatic
|
||||
|
||||
# Set the amount of time a bridge using the automatic start type will wait
|
||||
# until attempting to reconnect. Defaults to 30 seconds.
|
||||
#restart_timeout 30
|
||||
|
||||
# Set the amount of time a bridge using the lazy start type must be idle before
|
||||
# it will be stopped. Defaults to 60 seconds.
|
||||
#idle_timeout 60
|
||||
|
||||
# Set the number of messages that need to be queued for a bridge with lazy
|
||||
# start type to be restarted. Defaults to 10 messages.
|
||||
# Must be less than max_queued_messages.
|
||||
#threshold 10
|
||||
|
||||
# If try_private is set to true, the bridge will attempt to indicate to the
|
||||
# remote broker that it is a bridge not an ordinary client. If successful, this
|
||||
# means that loop detection will be more effective and that retained messages
|
||||
# will be propagated correctly. Not all brokers support this feature so it may
|
||||
# be necessary to set try_private to false if your bridge does not connect
|
||||
# properly.
|
||||
#try_private true
|
||||
|
||||
# Set the username to use when connecting to a broker that requires
|
||||
# authentication.
|
||||
# This replaces the old "username" option to avoid confusion. "username"
|
||||
# remains valid for the time being.
|
||||
#remote_username
|
||||
|
||||
# Set the password to use when connecting to a broker that requires
|
||||
# authentication. This option is only used if remote_username is also set.
|
||||
# This replaces the old "password" option to avoid confusion. "password"
|
||||
# remains valid for the time being.
|
||||
#remote_password
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Certificate based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# Either bridge_cafile or bridge_capath must be defined to enable TLS support
|
||||
# for this bridge.
|
||||
# bridge_cafile defines the path to a file containing the
|
||||
# Certificate Authority certificates that have signed the remote broker
|
||||
# certificate.
|
||||
# bridge_capath defines a directory that will be searched for files containing
|
||||
# the CA certificates. For bridge_capath to work correctly, the certificate
|
||||
# files must have ".crt" as the file ending and you must run "c_rehash <path to
|
||||
# capath>" each time you add/remove a certificate.
|
||||
#bridge_cafile
|
||||
#bridge_capath
|
||||
|
||||
# Path to the PEM encoded client certificate, if required by the remote broker.
|
||||
#bridge_certfile
|
||||
|
||||
# Path to the PEM encoded client private key, if required by the remote broker.
|
||||
#bridge_keyfile
|
||||
|
||||
# When using certificate based encryption, bridge_insecure disables
|
||||
# verification of the server hostname in the server certificate. This can be
|
||||
# useful when testing initial server configurations, but makes it possible for
|
||||
# a malicious third party to impersonate your server through DNS spoofing, for
|
||||
# example. Use this option in testing only. If you need to resort to using this
|
||||
# option in a production environment, your setup is at fault and there is no
|
||||
# point using encryption.
|
||||
#bridge_insecure false
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# PSK based SSL/TLS support
|
||||
# -----------------------------------------------------------------
|
||||
# Pre-shared-key encryption provides an alternative to certificate based
|
||||
# encryption. A bridge can be configured to use PSK with the bridge_identity
|
||||
# and bridge_psk options. These are the client PSK identity, and pre-shared-key
|
||||
# in hexadecimal format with no "0x". Only one of certificate and PSK based
|
||||
# encryption can be used on one
|
||||
# bridge at once.
|
||||
#bridge_identity
|
||||
#bridge_psk
|
||||
|
||||
|
||||
# =================================================================
|
||||
# External config files
|
||||
# =================================================================
|
||||
|
||||
# External configuration files may be included by using the
|
||||
# include_dir option. This defines a directory that will be searched
|
||||
# for config files. All files that end in '.conf' will be loaded as
|
||||
# a configuration file. It is best to have this as the last option
|
||||
# in the main file. This option will only be processed from the main
|
||||
# configuration file. The directory specified must not contain the
|
||||
# main configuration file.
|
||||
#include_dir
|
||||
|
||||
# =================================================================
|
||||
# rsmb options - unlikely to ever be supported
|
||||
# =================================================================
|
||||
|
||||
#ffdc_output
|
||||
#max_log_entries
|
||||
#trace_level
|
||||
#trace_output
|
@ -9,9 +9,7 @@ LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
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 ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/
|
||||
|
||||
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# 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
|
||||
# example: .env MYSQL_USER=appuser and needed db name is myshop_db
|
||||
#
|
||||
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
|
||||
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
|
||||
|
@ -6,5 +6,5 @@
|
||||
[mysql]
|
||||
|
||||
[mysqld]
|
||||
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|
||||
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
|
||||
character-set-server=utf8
|
||||
|
@ -14,6 +14,7 @@ RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache openssl \
|
||||
&& apk add --no-cache bash \
|
||||
&& adduser -D -H -u 1000 -s /bin/bash www-data
|
||||
|
||||
@ -24,6 +25,8 @@ ARG PHP_UPSTREAM_PORT=9000
|
||||
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"]
|
||||
ADD ./startup.sh /opt/startup.sh
|
||||
RUN sed -i 's/\r//g' /opt/startup.sh
|
||||
CMD ["/bin/bash", "/opt/startup.sh"]
|
||||
|
||||
EXPOSE 80 443
|
||||
|
@ -3,6 +3,12 @@ server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
# For https
|
||||
# listen 443 ssl;
|
||||
# listen [::]:443 ssl ipv6only=on;
|
||||
# ssl_certificate /etc/nginx/ssl/default.crt;
|
||||
# ssl_certificate_key /etc/nginx/ssl/default.key;
|
||||
|
||||
server_name app.test;
|
||||
root /var/www/app;
|
||||
index index.php index.html index.htm;
|
||||
|
@ -3,6 +3,12 @@ server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
|
||||
# For https
|
||||
# listen 443 ssl default_server;
|
||||
# listen [::]:443 ssl default_server ipv6only=on;
|
||||
# ssl_certificate /etc/nginx/ssl/default.crt;
|
||||
# ssl_certificate_key /etc/nginx/ssl/default.key;
|
||||
|
||||
server_name localhost;
|
||||
root /var/www/public;
|
||||
index index.php index.html index.htm;
|
||||
|
@ -3,6 +3,12 @@ server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
# For https
|
||||
# listen 443 ssl;
|
||||
# listen [::]:443 ssl ipv6only=on;
|
||||
# ssl_certificate /etc/nginx/ssl/default.crt;
|
||||
# ssl_certificate_key /etc/nginx/ssl/default.key;
|
||||
|
||||
server_name laravel.test;
|
||||
root /var/www/laravel/public;
|
||||
index index.php index.html index.htm;
|
||||
|
@ -3,6 +3,12 @@ server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
# For https
|
||||
# listen 443 ssl;
|
||||
# listen [::]:443 ssl ipv6only=on;
|
||||
# ssl_certificate /etc/nginx/ssl/default.crt;
|
||||
# ssl_certificate_key /etc/nginx/ssl/default.key;
|
||||
|
||||
server_name symfony.test;
|
||||
root /var/www/projects/symfony/web;
|
||||
index index.php index.html index.htm;
|
||||
|
3
nginx/ssl/.gitignore
vendored
Normal file
3
nginx/ssl/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.crt
|
||||
*.csr
|
||||
*.key
|
0
nginx/ssl/.gitkeep
Normal file
0
nginx/ssl/.gitkeep
Normal file
9
nginx/startup.sh
Normal file
9
nginx/startup.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f /etc/nginx/ssl/default.crt ]; then
|
||||
openssl genrsa -out "/etc/nginx/ssl/default.key" 2048
|
||||
openssl req -new -key "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.csr" -subj "/CN=default/O=default/C=UK"
|
||||
openssl x509 -req -days 365 -in "/etc/nginx/ssl/default.csr" -signkey "/etc/nginx/ssl/default.key" -out "/etc/nginx/ssl/default.crt"
|
||||
fi
|
||||
|
||||
nginx
|
605
php-fpm/Dockerfile
Normal file
605
php-fpm/Dockerfile
Normal file
@ -0,0 +1,605 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/php-fpm
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
ARG LARADOCK_PHP_VERSION
|
||||
|
||||
FROM laradock/php-fpm:2.2-${LARADOCK_PHP_VERSION}
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
ARG LARADOCK_PHP_VERSION
|
||||
|
||||
# Set Environment Variables
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# always run apt update when start and after add new source list, then clean up at end.
|
||||
RUN apt-get update -yqq && \
|
||||
apt-get install -y apt-utils && \
|
||||
pecl channel-update pecl.php.net
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Mandatory Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/php-fpm).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_ZIP_ARCHIVE=true
|
||||
#
|
||||
|
||||
###########################################################################
|
||||
# SSH2:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_SSH2=false
|
||||
|
||||
RUN if [ ${INSTALL_SSH2} = true ]; then \
|
||||
# Install the ssh2 extension
|
||||
apt-get -y install libssh2-1-dev && \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install -a ssh2-0.13; \
|
||||
else \
|
||||
pecl install -a ssh2-1.1.2; \
|
||||
fi && \
|
||||
docker-php-ext-enable ssh2 \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# libfaketime:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_FAKETIME=false
|
||||
|
||||
RUN if [ ${INSTALL_FAKETIME} = true ]; then \
|
||||
apt-get install -y libfaketime \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# SOAP:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the soap extension
|
||||
rm /etc/apt/preferences.d/no-debian-php && \
|
||||
apt-get -y install libxml2-dev php-soap && \
|
||||
docker-php-ext-install soap \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# pgsql
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PGSQL=false
|
||||
|
||||
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
# Install the pgsql extension
|
||||
docker-php-ext-install pgsql \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# pgsql client
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PG_CLIENT=false
|
||||
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Create folders if not exists (https://github.com/tianon/docker-brew-debian/issues/65)
|
||||
mkdir -p /usr/share/man/man1 && \
|
||||
mkdir -p /usr/share/man/man7 && \
|
||||
# Install the pgsql client
|
||||
apt-get install -y postgresql-client \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# xDebug:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Install the xdebug extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install xdebug-2.5.5; \
|
||||
else \
|
||||
pecl install xdebug; \
|
||||
fi && \
|
||||
docker-php-ext-enable xdebug \
|
||||
;fi
|
||||
|
||||
# Copy xdebug configuration for remote debugging
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
###########################################################################
|
||||
# Phpdbg:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PHPDBG=false
|
||||
|
||||
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get install -y --force-yes php${LARADOCK_PHP_VERSION}-phpdbg \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Blackfire:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
|
||||
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
|
||||
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
|
||||
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
||||
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# PHP REDIS EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Swoole EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_SWOOLE=false
|
||||
|
||||
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||
# Install Php Swoole Extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install swoole-2.0.11; \
|
||||
else \
|
||||
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
||||
pecl install swoole-2.2.0; \
|
||||
else \
|
||||
pecl install swoole; \
|
||||
fi \
|
||||
fi && \
|
||||
docker-php-ext-enable swoole \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# MongoDB:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_MONGO=false
|
||||
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install mongo && \
|
||||
docker-php-ext-enable mongo \
|
||||
;fi && \
|
||||
pecl install mongodb && \
|
||||
docker-php-ext-enable mongodb \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# AMQP:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_AMQP=false
|
||||
|
||||
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||
apt-get install librabbitmq-dev -y && \
|
||||
# Install the amqp extension
|
||||
pecl install amqp && \
|
||||
docker-php-ext-enable amqp && \
|
||||
# Install the sockets extension
|
||||
docker-php-ext-install sockets \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# ZipArchive:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_ZIP_ARCHIVE=false
|
||||
|
||||
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
|
||||
apt-get install libzip-dev -y && \
|
||||
docker-php-ext-configure zip --with-libzip && \
|
||||
# Install the zip extension
|
||||
docker-php-ext-install zip \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# pcntl
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PCNTL=false
|
||||
RUN if [ ${INSTALL_PCNTL} = true ]; then \
|
||||
# Installs pcntl, helpful for running Horizon
|
||||
docker-php-ext-install pcntl \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# bcmath:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_BCMATH=false
|
||||
|
||||
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||
# Install the bcmath extension
|
||||
docker-php-ext-install bcmath \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# GMP (GNU Multiple Precision):
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_GMP=false
|
||||
|
||||
RUN if [ ${INSTALL_GMP} = true ]; then \
|
||||
# Install the GMP extension
|
||||
apt-get install -y libgmp-dev && \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \
|
||||
;fi && \
|
||||
docker-php-ext-install gmp \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# PHP Memcached:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_MEMCACHED=false
|
||||
|
||||
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
||||
# Install the php memcached extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \
|
||||
else \
|
||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz"; \
|
||||
fi \
|
||||
&& mkdir -p memcached \
|
||||
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd memcached \
|
||||
&& phpize \
|
||||
&& ./configure \
|
||||
&& make -j$(nproc) \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm -r memcached \
|
||||
&& rm /tmp/memcached.tar.gz \
|
||||
&& docker-php-ext-enable memcached \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Exif:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_EXIF=false
|
||||
|
||||
RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||
# Enable Exif PHP extentions requirements
|
||||
docker-php-ext-install exif \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# PHP Aerospike:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ARG AEROSPIKE_PHP_REPOSITORY
|
||||
|
||||
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||
# Fix dependencies for PHPUnit within aerospike extension
|
||||
apt-get -y install sudo wget && \
|
||||
# Install the php aerospike extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz; \
|
||||
else \
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY}; \
|
||||
fi \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
( \
|
||||
cd aerospike-client-php/src/aerospike \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
else \
|
||||
( \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
fi \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& docker-php-ext-enable aerospike \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# IonCube Loader:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_IONCUBE=false
|
||||
|
||||
RUN if [ ${INSTALL_IONCUBE} = true ]; then \
|
||||
# Install the php ioncube loader
|
||||
curl -L -o /tmp/ioncube_loaders_lin_x86-64.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
|
||||
&& tar zxpf /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp \
|
||||
&& mv /tmp/ioncube/ioncube_loader_lin_${LARADOCK_PHP_VERSION}.so $(php -r "echo ini_get('extension_dir');")/ioncube_loader.so \
|
||||
&& printf "zend_extension=ioncube_loader.so\n" > $PHP_INI_DIR/conf.d/0ioncube.ini \
|
||||
&& rm -rf /tmp/ioncube* \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Opcache:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_OPCACHE=false
|
||||
|
||||
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||
docker-php-ext-install opcache \
|
||||
;fi
|
||||
|
||||
# Copy opcache configration
|
||||
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
###########################################################################
|
||||
# Mysqli Modifications:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_MYSQLI=false
|
||||
|
||||
RUN if [ ${INSTALL_MYSQLI} = true ]; then \
|
||||
docker-php-ext-install mysqli \
|
||||
;fi
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Human Language and Character Encoding Support:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_INTL=false
|
||||
|
||||
RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||
# Install intl and requirements
|
||||
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
||||
docker-php-ext-configure intl && \
|
||||
docker-php-ext-install intl \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# GHOSTSCRIPT:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_GHOSTSCRIPT=false
|
||||
|
||||
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||
# Install the ghostscript extension
|
||||
# for PDF editing
|
||||
apt-get install -y \
|
||||
poppler-utils \
|
||||
ghostscript \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# LDAP:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_LDAP=false
|
||||
|
||||
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||
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
|
||||
|
||||
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
apt-get -y install freetds-dev libsybdb5 \
|
||||
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so \
|
||||
&& docker-php-ext-install mssql pdo_dblib \
|
||||
&& php -m | grep -q 'mssql' \
|
||||
&& php -m | grep -q 'pdo_dblib' \
|
||||
;else \
|
||||
###########################################################################
|
||||
# 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 install -y apt-transport-https gnupg \
|
||||
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
|
||||
&& curl https://packages.microsoft.com/config/debian/9/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 msodbcsql17 locales \
|
||||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
||||
# link local aliases
|
||||
&& ln -sfn /etc/locale.alias /usr/share/locale/locale.alias \
|
||||
&& locale-gen \
|
||||
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
|
||||
&& pecl install pdo_sqlsrv sqlsrv \
|
||||
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||
&& php -m | grep -q 'sqlsrv' \
|
||||
;fi \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Image optimizers:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y jpegoptim optipng pngquant gifsicle \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# ImageMagick:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y libmagickwand-dev imagemagick && \
|
||||
pecl install imagick && \
|
||||
docker-php-ext-enable imagick \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# IMAP:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_IMAP=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
apt-get install -y libc-client-dev libkrb5-dev && \
|
||||
rm -r /var/lib/apt/lists/* && \
|
||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
||||
docker-php-ext-install imap \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Calendar:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_CALENDAR=false
|
||||
|
||||
RUN if [ ${INSTALL_CALENDAR} = true ]; then \
|
||||
docker-php-ext-configure calendar && \
|
||||
docker-php-ext-install calendar \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Phalcon:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PHALCON=false
|
||||
ARG LARADOCK_PHALCON_VERSION
|
||||
ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
|
||||
|
||||
# Copy phalcon configration
|
||||
COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini.disable
|
||||
|
||||
RUN if [ $INSTALL_PHALCON = true ]; then \
|
||||
apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c \
|
||||
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \
|
||||
&& unzip -d /tmp/ /tmp/cphalcon.zip \
|
||||
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \
|
||||
&& ./install \
|
||||
&& mv /usr/local/etc/php/conf.d/phalcon.ini.disable /usr/local/etc/php/conf.d/phalcon.ini \
|
||||
&& rm -rf /tmp/cphalcon* \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# APCU:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_APCU=false
|
||||
|
||||
RUN if [ ${INSTALL_APCU} = true ]; then \
|
||||
pecl install apcu && \
|
||||
docker-php-ext-enable apcu \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# YAML:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_YAML=false
|
||||
|
||||
RUN if [ ${INSTALL_YAML} = true ]; then \
|
||||
apt-get install libyaml-dev -y ; \
|
||||
pecl install yaml ; \
|
||||
docker-php-ext-enable yaml \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Check PHP version:
|
||||
###########################################################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP ${LARADOCK_PHP_VERSION}."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
COPY ./laravel.ini /usr/local/etc/php/conf.d
|
||||
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
USER root
|
||||
|
||||
# Clean up
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
||||
rm /var/log/lastlog /var/log/faillog
|
||||
|
||||
RUN usermod -u 1000 www-data
|
||||
|
||||
# Adding the faketime library to the preload file needs to be done last
|
||||
# otherwise it will preload it for all commands that follow in this file
|
||||
RUN if [ ${INSTALL_FAKETIME} = true ]; then \
|
||||
echo "/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1" > /etc/ld.so.preload \
|
||||
;fi
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
EXPOSE 9000
|
@ -1,372 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/php-fpm
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/php-fpm:2.0-56
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Mandatory Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/php-fpm).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_ZIP_ARCHIVE=true
|
||||
#
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the soap extension
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install libxml2-dev php-soap && \
|
||||
docker-php-ext-install soap \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Install the xdebug extension
|
||||
# pecl install xdebug && docker-php-ext-enable xdebug \
|
||||
# workaround for https://github.com/docker-library/php/issues/133
|
||||
# - Xdebug breaks on access to class static property
|
||||
apt-get install -y php5-xdebug && \
|
||||
echo "zend_extension=/usr/lib/php5/20131226/xdebug.so" > /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
||||
;fi
|
||||
|
||||
# Copy xdebug configration for remote debugging
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
# Blackfire:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
|
||||
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
|
||||
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
|
||||
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
||||
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 5
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MONGO=false
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl install mongodb && \
|
||||
docker-php-ext-enable mongodb \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_ZIP_ARCHIVE=false
|
||||
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
|
||||
# Install the zip extension
|
||||
docker-php-ext-install zip \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# bcmath:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BCMATH=false
|
||||
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||
# Install the bcmath extension
|
||||
docker-php-ext-install bcmath \
|
||||
;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 && \
|
||||
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h && \
|
||||
docker-php-ext-install gmp \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Memcached:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MEMCACHED=false
|
||||
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
||||
# Install the php memcached extension
|
||||
pecl install memcached-2.2.0 && \
|
||||
docker-php-ext-enable memcached \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Exif:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_EXIF=false
|
||||
RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||
# Enable Exif PHP extentions requirements
|
||||
docker-php-ext-install exif \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
|
||||
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
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz" \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src/aerospike \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& docker-php-ext-enable aerospike \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Opcache:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_OPCACHE=false
|
||||
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||
docker-php-ext-install opcache \
|
||||
;fi
|
||||
|
||||
# Copy opcache configration
|
||||
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
#####################################
|
||||
# Mysqli Modifications:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MYSQLI=false
|
||||
# MySQL extenstion is available for Php5.6 and lower only
|
||||
COPY ./mysql.ini /usr/local/etc/php/conf.d/mysql.ini
|
||||
RUN if [ ${INSTALL_MYSQLI} = true ]; then \
|
||||
docker-php-ext-install mysql && \
|
||||
docker-php-ext-install mysqli \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Tokenizer Modifications:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_TOKENIZER=false
|
||||
RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
|
||||
docker-php-ext-install tokenizer \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Human Language and Character Encoding Support:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_INTL=false
|
||||
RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||
# Install intl and requirements
|
||||
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
||||
docker-php-ext-configure intl && \
|
||||
docker-php-ext-install intl \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# GHOSTSCRIPT:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_GHOSTSCRIPT=false
|
||||
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||
# Install the ghostscript extension for PDF editing
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y poppler-utils ghostscript \
|
||||
;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 set -eux; 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 pdo_dblib mssql \
|
||||
&& php -m | grep -q 'mssql' \
|
||||
;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
|
||||
|
||||
#####################################
|
||||
# IMAP:
|
||||
#####################################
|
||||
ARG INSTALL_IMAP=false
|
||||
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
apt-get update && \
|
||||
apt-get install -y libc-client-dev libkrb5-dev && \
|
||||
rm -r /var/lib/apt/lists/* && \
|
||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
||||
docker-php-ext-install imap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Check PHP version:
|
||||
#####################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 5.6."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
COPY ./laravel.ini /usr/local/etc/php/conf.d
|
||||
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
RUN usermod -u 1000 www-data
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
EXPOSE 9000
|
@ -1,394 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/php-fpm
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/php-fpm:2.0-70
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Mandatory Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/php-fpm).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_ZIP_ARCHIVE=true
|
||||
#
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the soap extension
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install libxml2-dev php-soap && \
|
||||
docker-php-ext-install soap \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Install the xdebug extension
|
||||
pecl install xdebug && \
|
||||
docker-php-ext-enable xdebug \
|
||||
;fi
|
||||
|
||||
# Copy xdebug configration for remote debugging
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
# Blackfire:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
|
||||
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
|
||||
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
|
||||
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
||||
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MONGO=false
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl install mongodb && \
|
||||
docker-php-ext-enable mongodb \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_ZIP_ARCHIVE=false
|
||||
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
|
||||
# Install the zip extension
|
||||
docker-php-ext-install zip \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# bcmath:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BCMATH=false
|
||||
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||
# Install the bcmath extension
|
||||
docker-php-ext-install bcmath \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MEMCACHED=false
|
||||
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
||||
# Install the php memcached extension
|
||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
|
||||
&& mkdir -p memcached \
|
||||
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd memcached \
|
||||
&& phpize \
|
||||
&& ./configure \
|
||||
&& make -j$(nproc) \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm -r memcached \
|
||||
&& rm /tmp/memcached.tar.gz \
|
||||
&& docker-php-ext-enable memcached \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Exif:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_EXIF=false
|
||||
RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||
# Enable Exif PHP extentions requirements
|
||||
docker-php-ext-install exif \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
|
||||
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
|
||||
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 \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& docker-php-ext-enable aerospike \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Opcache:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_OPCACHE=false
|
||||
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||
docker-php-ext-install opcache \
|
||||
;fi
|
||||
|
||||
# Copy opcache configration
|
||||
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
#####################################
|
||||
# Mysqli Modifications:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MYSQLI=false
|
||||
RUN if [ ${INSTALL_MYSQLI} = true ]; then \
|
||||
docker-php-ext-install mysqli \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Tokenizer Modifications:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_TOKENIZER=false
|
||||
RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
|
||||
docker-php-ext-install tokenizer \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Human Language and Character Encoding Support:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_INTL=false
|
||||
RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||
# Install intl and requirements
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
||||
docker-php-ext-configure intl && \
|
||||
docker-php-ext-install intl \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# GHOSTSCRIPT:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_GHOSTSCRIPT=false
|
||||
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||
# Install the ghostscript extension
|
||||
# for PDF editing
|
||||
apt-get update -yqq \
|
||||
&& apt-get install -y \
|
||||
poppler-utils \
|
||||
ghostscript \
|
||||
;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 set -eux; 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 \
|
||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||
&& php -m | grep -q '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
|
||||
|
||||
#####################################
|
||||
# IMAP:
|
||||
#####################################
|
||||
ARG INSTALL_IMAP=false
|
||||
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
apt-get update && \
|
||||
apt-get install -y libc-client-dev libkrb5-dev && \
|
||||
rm -r /var/lib/apt/lists/* && \
|
||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
||||
docker-php-ext-install imap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Check PHP version:
|
||||
#####################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.0."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
COPY ./laravel.ini /usr/local/etc/php/conf.d/
|
||||
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
RUN usermod -u 1000 www-data
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
EXPOSE 9000
|
@ -1,394 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/php-fpm
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/php-fpm:2.0-71
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Mandatory Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/php-fpm).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_ZIP_ARCHIVE=true
|
||||
#
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the soap extension
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install libxml2-dev php-soap && \
|
||||
docker-php-ext-install soap \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Install the xdebug extension
|
||||
pecl install xdebug && \
|
||||
docker-php-ext-enable xdebug \
|
||||
;fi
|
||||
|
||||
# Copy xdebug configuration for remote debugging
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
# Blackfire:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
|
||||
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
|
||||
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
|
||||
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
||||
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7.0
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MONGO=false
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl install mongodb && \
|
||||
docker-php-ext-enable mongodb \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_ZIP_ARCHIVE=false
|
||||
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
|
||||
# Install the zip extension
|
||||
docker-php-ext-install zip \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# bcmath:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BCMATH=false
|
||||
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||
# Install the bcmath extension
|
||||
docker-php-ext-install bcmath \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MEMCACHED=false
|
||||
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
||||
# Install the php memcached extension
|
||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
|
||||
&& mkdir -p memcached \
|
||||
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd memcached \
|
||||
&& phpize \
|
||||
&& ./configure \
|
||||
&& make -j$(nproc) \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm -r memcached \
|
||||
&& rm /tmp/memcached.tar.gz \
|
||||
&& docker-php-ext-enable memcached \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Exif:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_EXIF=false
|
||||
RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||
# Enable Exif PHP extentions requirements
|
||||
docker-php-ext-install exif \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
|
||||
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
|
||||
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 \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& docker-php-ext-enable aerospike \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Opcache:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_OPCACHE=false
|
||||
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||
docker-php-ext-install opcache \
|
||||
;fi
|
||||
|
||||
# Copy opcache configration
|
||||
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
#####################################
|
||||
# Mysqli Modifications:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MYSQLI=false
|
||||
RUN if [ ${INSTALL_MYSQLI} = true ]; then \
|
||||
docker-php-ext-install mysqli \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Tokenizer Modifications:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_TOKENIZER=false
|
||||
RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
|
||||
docker-php-ext-install tokenizer \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Human Language and Character Encoding Support:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_INTL=false
|
||||
RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||
# Install intl and requirements
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
||||
docker-php-ext-configure intl && \
|
||||
docker-php-ext-install intl \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# GHOSTSCRIPT:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_GHOSTSCRIPT=false
|
||||
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||
# Install the ghostscript extension
|
||||
# for PDF editing
|
||||
apt-get update -yqq \
|
||||
&& apt-get install -y \
|
||||
poppler-utils \
|
||||
ghostscript \
|
||||
;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 set -eux; 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 \
|
||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||
&& php -m | grep -q '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
|
||||
|
||||
#####################################
|
||||
# IMAP:
|
||||
#####################################
|
||||
ARG INSTALL_IMAP=false
|
||||
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
apt-get update && \
|
||||
apt-get install -y libc-client-dev libkrb5-dev && \
|
||||
rm -r /var/lib/apt/lists/* && \
|
||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
||||
docker-php-ext-install imap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Check PHP version:
|
||||
#####################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.1."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
COPY ./laravel.ini /usr/local/etc/php/conf.d
|
||||
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
RUN usermod -u 1000 www-data
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
EXPOSE 9000
|
@ -1,397 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/php-fpm
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/php-fpm:2.0-72
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Mandatory Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/php-fpm).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_ZIP_ARCHIVE=true
|
||||
#
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the soap extension
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install libxml2-dev php-soap && \
|
||||
docker-php-ext-install soap \
|
||||
;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 \
|
||||
# Create folders if not exists (https://github.com/tianon/docker-brew-debian/issues/65)
|
||||
mkdir -p /usr/share/man/man1 && \
|
||||
mkdir -p /usr/share/man/man7 && \
|
||||
# Install the pgsql client
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y postgresql-client \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# xDebug:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Install the xdebug extension
|
||||
pecl install xdebug && \
|
||||
docker-php-ext-enable xdebug \
|
||||
;fi
|
||||
|
||||
# Copy xdebug configuration for remote debugging
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
# Blackfire:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
|
||||
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
|
||||
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
|
||||
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
|
||||
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7.0
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis Extension
|
||||
printf "\n" | pecl install -o -f redis \
|
||||
&& rm -rf /tmp/pear \
|
||||
&& docker-php-ext-enable redis \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MONGO=false
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl install mongodb && \
|
||||
docker-php-ext-enable mongodb \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_ZIP_ARCHIVE=false
|
||||
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
|
||||
# Install the zip extension
|
||||
docker-php-ext-install zip \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# bcmath:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BCMATH=false
|
||||
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||
# Install the bcmath extension
|
||||
docker-php-ext-install bcmath \
|
||||
;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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MEMCACHED=false
|
||||
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
||||
# Install the php memcached extension
|
||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
|
||||
&& mkdir -p memcached \
|
||||
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd memcached \
|
||||
&& phpize \
|
||||
&& ./configure \
|
||||
&& make -j$(nproc) \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm -r memcached \
|
||||
&& rm /tmp/memcached.tar.gz \
|
||||
&& docker-php-ext-enable memcached \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Exif:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_EXIF=false
|
||||
RUN if [ ${INSTALL_EXIF} = true ]; then \
|
||||
# Enable Exif PHP extentions requirements
|
||||
docker-php-ext-install exif \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
|
||||
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 (using 7.2.0-in-progress branch until support for 7.2 on master)
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/7.2.0-in-progress.tar.gz" \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& docker-php-ext-enable aerospike \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Opcache:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_OPCACHE=false
|
||||
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||
docker-php-ext-install opcache \
|
||||
;fi
|
||||
|
||||
# Copy opcache configration
|
||||
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
#####################################
|
||||
# Mysqli Modifications:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_MYSQLI=false
|
||||
RUN if [ ${INSTALL_MYSQLI} = true ]; then \
|
||||
docker-php-ext-install mysqli \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Tokenizer Modifications:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_TOKENIZER=false
|
||||
RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
|
||||
docker-php-ext-install tokenizer \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Human Language and Character Encoding Support:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_INTL=false
|
||||
RUN if [ ${INSTALL_INTL} = true ]; then \
|
||||
# Install intl and requirements
|
||||
apt-get update -yqq && \
|
||||
apt-get install -y zlib1g-dev libicu-dev g++ && \
|
||||
docker-php-ext-configure intl && \
|
||||
docker-php-ext-install intl \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# GHOSTSCRIPT:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_GHOSTSCRIPT=false
|
||||
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
|
||||
# Install the ghostscript extension
|
||||
# for PDF editing
|
||||
apt-get update -yqq \
|
||||
&& apt-get install -y \
|
||||
poppler-utils \
|
||||
ghostscript \
|
||||
;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 set -eux; 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 gnupg \
|
||||
&& 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 \
|
||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||
&& php -m | grep -q '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
|
||||
|
||||
#####################################
|
||||
# IMAP:
|
||||
#####################################
|
||||
ARG INSTALL_IMAP=false
|
||||
ENV INSTALL_IMAP ${INSTALL_IMAP}
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
apt-get update && \
|
||||
apt-get install -y libc-client-dev libkrb5-dev && \
|
||||
rm -r /var/lib/apt/lists/* && \
|
||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
||||
docker-php-ext-install imap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Check PHP version:
|
||||
#####################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.2."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
COPY ./laravel.ini /usr/local/etc/php/conf.d
|
||||
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
|
||||
|
||||
#RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
RUN usermod -u 1000 www-data
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
EXPOSE 9000
|
1
php-fpm/phalcon.ini
Normal file
1
php-fpm/phalcon.ini
Normal file
@ -0,0 +1 @@
|
||||
extension=phalcon.so
|
@ -4,7 +4,8 @@
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
FROM php:7.2-alpine
|
||||
ARG PHP_VERSION=${PHP_VERSION}
|
||||
FROM php:${PHP_VERSION}-alpine
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
@ -15,15 +16,37 @@ RUN apk --update add wget \
|
||||
libmemcached-dev \
|
||||
libmcrypt-dev \
|
||||
libxml2-dev \
|
||||
pcre-dev \
|
||||
zlib-dev \
|
||||
autoconf \
|
||||
cyrus-sasl-dev \
|
||||
libgsasl-dev \
|
||||
supervisor
|
||||
|
||||
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml
|
||||
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
|
||||
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
|
||||
|
||||
# Add a non-root user:
|
||||
ARG PUID=1000
|
||||
ENV PUID ${PUID}
|
||||
ARG PGID=1000
|
||||
ENV PGID ${PGID}
|
||||
|
||||
RUN addgroup -g ${PGID} laradock && \
|
||||
adduser -D -G laradock -u ${PUID} laradock
|
||||
|
||||
#Install SOAP package:
|
||||
ARG INSTALL_SOAP=false
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
docker-php-ext-install soap \
|
||||
;fi
|
||||
|
||||
#Install BCMath package:
|
||||
ARG INSTALL_BCMATH=false
|
||||
RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
||||
docker-php-ext-install bcmath \
|
||||
;fi
|
||||
|
||||
# Install PostgreSQL drivers:
|
||||
ARG INSTALL_PGSQL=false
|
||||
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
@ -31,9 +54,32 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||
&& docker-php-ext-install pdo_pgsql \
|
||||
;fi
|
||||
|
||||
# Install ZipArchive:
|
||||
ARG INSTALL_ZIP_ARCHIVE=false
|
||||
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
|
||||
apk --update add libzip-dev && \
|
||||
docker-php-ext-configure zip --with-libzip && \
|
||||
# Install the zip extension
|
||||
docker-php-ext-install zip \
|
||||
;fi
|
||||
|
||||
RUN rm /var/cache/apk/* \
|
||||
&& mkdir -p /var/www
|
||||
|
||||
# Install Phalcon ext
|
||||
ARG INSTALL_PHALCON=false
|
||||
ARG PHALCON_VERSION
|
||||
ENV PHALCON_VERSION ${PHALCON_VERSION}
|
||||
|
||||
RUN if [ $INSTALL_PHALCON = true ]; then \
|
||||
apk --update add unzip gcc make re2c bash\
|
||||
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.zip \
|
||||
&& unzip -d /tmp/ /tmp/cphalcon.zip \
|
||||
&& cd /tmp/cphalcon-${PHALCON_VERSION}/build \
|
||||
&& ./install \
|
||||
&& rm -rf /tmp/cphalcon* \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Supervisord Configuration
|
||||
@ -62,7 +108,7 @@ ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.2."
|
||||
RUN php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
@ -1,73 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
FROM php:7.1-alpine
|
||||
|
||||
LABEL 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 -- #
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Check PHP version
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.1."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
WORKDIR /etc/supervisor/conf.d/
|
1
php-worker/supervisord.d/.gitignore
vendored
Normal file
1
php-worker/supervisord.d/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.conf
|
8
php-worker/supervisord.d/laravel-scheduler.conf.example
Normal file
8
php-worker/supervisord.d/laravel-scheduler.conf.example
Normal file
@ -0,0 +1,8 @@
|
||||
[program:laravel-scheduler]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=/bin/sh -c "while [ true ]; do (php /var/www/artisan schedule:run --verbose --no-interaction &); sleep 60; done"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
numprocs=1
|
||||
user=laradock
|
||||
redirect_stderr=true
|
@ -4,4 +4,5 @@ command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon
|
||||
autostart=true
|
||||
autorestart=true
|
||||
numprocs=8
|
||||
user=laradock
|
||||
redirect_stderr=true
|
3
portainer/Dockerfile
Normal file
3
portainer/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM portainer/portainer
|
||||
|
||||
LABEL maintainer="luciano@lucianojr.com.br"
|
3
postgres/docker-entrypoint-initdb.d/.gitignore
vendored
Normal file
3
postgres/docker-entrypoint-initdb.d/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.sh
|
||||
!init_gitlab_db.sh
|
||||
!init_jupyterhub_db.sh
|
33
postgres/docker-entrypoint-initdb.d/createdb.sh.example
Normal file
33
postgres/docker-entrypoint-initdb.d/createdb.sh.example
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copy createdb.sh.example to createdb.sh
|
||||
# then uncomment then set database name and username to create you need databases
|
||||
#
|
||||
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER myuser WITH PASSWORD 'mypassword';
|
||||
# CREATE DATABASE myshop_db;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
|
||||
# EOSQL
|
||||
#
|
||||
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
|
||||
#
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db1 WITH PASSWORD 'db1';
|
||||
# CREATE DATABASE db1;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
|
||||
# EOSQL
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db2 WITH PASSWORD 'db2';
|
||||
# CREATE DATABASE db2;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
|
||||
# EOSQL
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db3 WITH PASSWORD 'db3';
|
||||
# CREATE DATABASE db3;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
|
||||
# EOSQL
|
41
postgres/docker-entrypoint-initdb.d/init_gitlab_db.sh
Normal file
41
postgres/docker-entrypoint-initdb.d/init_gitlab_db.sh
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copy createdb.sh.example to createdb.sh
|
||||
# then uncomment then set database name and username to create you need databases
|
||||
#
|
||||
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER myuser WITH PASSWORD 'mypassword';
|
||||
# CREATE DATABASE myshop_db;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
|
||||
# EOSQL
|
||||
#
|
||||
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
|
||||
#
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db1 WITH PASSWORD 'db1';
|
||||
# CREATE DATABASE db1;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
|
||||
# EOSQL
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db2 WITH PASSWORD 'db2';
|
||||
# CREATE DATABASE db2;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
|
||||
# EOSQL
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db3 WITH PASSWORD 'db3';
|
||||
# CREATE DATABASE db3;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
|
||||
# EOSQL
|
||||
#
|
||||
### default database and user for gitlab ##############################################
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER laradock_gitlab WITH PASSWORD 'laradock_gitlab';
|
||||
CREATE DATABASE laradock_gitlab;
|
||||
GRANT ALL PRIVILEGES ON DATABASE laradock_gitlab TO laradock_gitlab;
|
||||
ALTER ROLE laradock_gitlab CREATEROLE SUPERUSER;
|
||||
EOSQL
|
41
postgres/docker-entrypoint-initdb.d/init_jupyterhub_db.sh
Normal file
41
postgres/docker-entrypoint-initdb.d/init_jupyterhub_db.sh
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copy createdb.sh.example to createdb.sh
|
||||
# then uncomment then set database name and username to create you need databases
|
||||
#
|
||||
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER myuser WITH PASSWORD 'mypassword';
|
||||
# CREATE DATABASE myshop_db;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
|
||||
# EOSQL
|
||||
#
|
||||
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
|
||||
#
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db1 WITH PASSWORD 'db1';
|
||||
# CREATE DATABASE db1;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
|
||||
# EOSQL
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db2 WITH PASSWORD 'db2';
|
||||
# CREATE DATABASE db2;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
|
||||
# EOSQL
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db3 WITH PASSWORD 'db3';
|
||||
# CREATE DATABASE db3;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
|
||||
# EOSQL
|
||||
#
|
||||
### default database and user for jupyterhub ##############################################
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER laradock_jupyterhub WITH PASSWORD 'laradock_jupyterhub';
|
||||
CREATE DATABASE laradock_jupyterhub;
|
||||
GRANT ALL PRIVILEGES ON DATABASE laradock_jupyterhub TO laradock_jupyterhub;
|
||||
ALTER ROLE laradock_jupyterhub CREATEROLE SUPERUSER;
|
||||
EOSQL
|
@ -12,3 +12,13 @@ RUN if [ ${SOLR_DATAIMPORTHANDLER_MYSQL} = true ]; then \
|
||||
&& rm /tmp/mysql_connector.tar.gz \
|
||||
;fi
|
||||
|
||||
ARG SOLR_DATAIMPORTHANDLER_MSSQL=false
|
||||
ENV SOLR_DATAIMPORTHANDLER_MSSQL ${SOLR_DATAIMPORTHANDLER_MSSQL}
|
||||
|
||||
# download mssql connector for dataimporthandler
|
||||
RUN if [ ${SOLR_DATAIMPORTHANDLER_MSSQL} = true ]; then \
|
||||
curl -L -o /tmp/mssql-jdbc-7.0.0.jre8.jar "https://github.com/Microsoft/mssql-jdbc/releases/download/v7.0.0/mssql-jdbc-7.0.0.jre8.jar" \
|
||||
&& mkdir /opt/solr/contrib/dataimporthandler/lib \
|
||||
&& mv /tmp/mssql-jdbc-7.0.0.jre8.jar "/opt/solr/contrib/dataimporthandler/lib/mssql-jdbc-7.0.0.jre8.jar" \
|
||||
;fi
|
||||
|
||||
|
4
sync.sh
4
sync.sh
@ -41,7 +41,7 @@ display_options () {
|
||||
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 " bash" "success"; printf "\t\t\t Opens bash on the workspace with user laradock.\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"
|
||||
}
|
||||
@ -69,7 +69,7 @@ elif [ "$1" == "down" ]; then
|
||||
docker-sync stop
|
||||
|
||||
elif [ "$1" == "bash" ]; then
|
||||
docker-compose exec workspace bash
|
||||
docker-compose exec --user=laradock workspace bash
|
||||
|
||||
elif [ "$1" == "install" ]; then
|
||||
print_style "Installing docker-sync\n" "info"
|
||||
|
5
thumbor/Dockerfile
Normal file
5
thumbor/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM apsl/thumbor
|
||||
|
||||
CMD ["thumbor"]
|
||||
|
||||
EXPOSE 8000
|
@ -14,6 +14,11 @@ if [ -n "${PHP_VERSION}" ]; then
|
||||
cp env-example .env
|
||||
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
|
||||
sed -i -- 's/=false/=true/g' .env
|
||||
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
|
||||
if [ "${PHP_VERSION}" == "5.6" ]; then
|
||||
sed -i -- 's/^AEROSPIKE_PHP_REPOSITORY=/##AEROSPIKE_PHP_REPOSITORY=/g' .env
|
||||
sed -i -- 's/^# AEROSPIKE_PHP_REPOSITORY=/AEROSPIKE_PHP_REPOSITORY=/g' .env
|
||||
fi
|
||||
cat .env
|
||||
docker-compose build ${BUILD_SERVICE}
|
||||
docker images
|
||||
|
@ -266,7 +266,7 @@ sub vcl_hit {
|
||||
return (deliver);
|
||||
} else {
|
||||
# No candidate for grace. Fetch a fresh object.
|
||||
return(fetch);
|
||||
return(miss);
|
||||
}
|
||||
} else {
|
||||
# backend is sick - use full grace
|
||||
@ -275,12 +275,12 @@ sub vcl_hit {
|
||||
return (deliver);
|
||||
} else {
|
||||
# no graced object.
|
||||
return (fetch);
|
||||
return (miss);
|
||||
}
|
||||
}
|
||||
|
||||
# fetch & deliver once we get the result
|
||||
return (fetch); # Dead code, keep as a safeguard
|
||||
return (miss); # Dead code, keep as a safeguard
|
||||
}
|
||||
|
||||
sub vcl_miss {
|
||||
|
@ -11,7 +11,7 @@ exec bash -c \
|
||||
"exec varnishd \
|
||||
-a :$VARNISH_PORT \
|
||||
-T localhost:6082 \
|
||||
-F -u varnish \
|
||||
-F \
|
||||
-f $VARNISH_CONFIG \
|
||||
-s malloc,$CACHE_SIZE \
|
||||
$VARNISHD_PARAMS"
|
913
workspace/Dockerfile
Normal file
913
workspace/Dockerfile
Normal file
@ -0,0 +1,913 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'workspace' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/workspace
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
ARG LARADOCK_PHP_VERSION
|
||||
|
||||
FROM laradock/workspace:2.2-${LARADOCK_PHP_VERSION}
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
ARG LARADOCK_PHP_VERSION
|
||||
|
||||
# Set Environment Variables
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Start as root
|
||||
USER root
|
||||
|
||||
###########################################################################
|
||||
# Laradock non-root user:
|
||||
###########################################################################
|
||||
|
||||
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||
ARG PUID=1000
|
||||
ENV PUID ${PUID}
|
||||
ARG PGID=1000
|
||||
ENV PGID ${PGID}
|
||||
|
||||
# always run apt update when start and after add new source list, then clean up at end.
|
||||
RUN apt-get update -yqq && \
|
||||
pecl channel-update pecl.php.net && \
|
||||
groupadd -g ${PGID} laradock && \
|
||||
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
|
||||
usermod -p "*" laradock
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Mandatory Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Mandatory Software's such as ("php-cli", "git", "vim", ....) are
|
||||
# installed on the base image 'laradock/workspace' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/workspace).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_NODE=false
|
||||
# - ...
|
||||
#
|
||||
|
||||
###########################################################################
|
||||
# Set Timezone
|
||||
###########################################################################
|
||||
|
||||
ARG TZ=UTC
|
||||
ENV TZ ${TZ}
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
###########################################################################
|
||||
# User Aliases
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
COPY ./aliases.sh /root/aliases.sh
|
||||
COPY ./aliases.sh /home/laradock/aliases.sh
|
||||
|
||||
RUN sed -i 's/\r//' /root/aliases.sh && \
|
||||
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||
chown laradock:laradock /home/laradock/aliases.sh && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
###########################################################################
|
||||
# Composer:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
# Add the composer.json
|
||||
COPY ./composer.json /home/laradock/.composer/composer.json
|
||||
|
||||
# Make sure that ~/.composer belongs to laradock
|
||||
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||
|
||||
USER laradock
|
||||
|
||||
# Check if global install need to be ran
|
||||
ARG COMPOSER_GLOBAL_INSTALL=false
|
||||
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
|
||||
|
||||
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||
# run the install
|
||||
composer global install \
|
||||
;fi
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
# Export composer vendor path
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
###########################################################################
|
||||
# Non-root user : PHPUnit path
|
||||
###########################################################################
|
||||
|
||||
# add ./vendor/bin to non-root user's bashrc (needed for phpunit)
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
###########################################################################
|
||||
# Crontab
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
COPY ./crontab /etc/cron.d
|
||||
|
||||
RUN chmod -R 644 /etc/cron.d
|
||||
|
||||
###########################################################################
|
||||
# Drush:
|
||||
###########################################################################
|
||||
|
||||
# Deprecated install of Drush 8 and earlier versions.
|
||||
# Drush 9 and up require Drush to be listed as a composer dependency of your site.
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_DRUSH=false
|
||||
ARG DRUSH_VERSION
|
||||
ENV DRUSH_VERSION ${DRUSH_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||
apt-get -y install mysql-client && \
|
||||
# Install Drush with the phar file.
|
||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/${DRUSH_VERSION}/drush.phar | bash && \
|
||||
chmod +x /usr/local/bin/drush && \
|
||||
drush core-status \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# SSH2:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SSH2=false
|
||||
|
||||
RUN if [ ${INSTALL_SSH2} = true ]; then \
|
||||
# Install the PHP SSH2 extension
|
||||
apt-get -y install libssh2-1-dev php${LARADOCK_PHP_VERSION}-ssh2 \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# GMP:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_GMP=false
|
||||
ARG PHP_VERSION=${LARADOCK_PHP_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_GMP} = true ]; then \
|
||||
# Install the PHP GMP extension
|
||||
apt-get -y install php${LARADOCK_PHP_VERSION}-gmp \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# SOAP:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the PHP SOAP extension
|
||||
apt-get -y install libxml2-dev php${LARADOCK_PHP_VERSION}-soap \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# LDAP:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_LDAP=false
|
||||
|
||||
RUN if [ ${INSTALL_LDAP} = true ]; then \
|
||||
apt-get install -y libldap2-dev && \
|
||||
apt-get install -y php${LARADOCK_PHP_VERSION}-ldap \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# IMAP:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_IMAP=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||
apt-get install -y php${LARADOCK_PHP_VERSION}-imap \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Subversion:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SUBVERSION=false
|
||||
|
||||
RUN if [ ${INSTALL_SUBVERSION} = true ]; then \
|
||||
apt-get install -y subversion \
|
||||
;fi
|
||||
|
||||
|
||||
###########################################################################
|
||||
# xDebug:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get install -y php${LARADOCK_PHP_VERSION}-xdebug && \
|
||||
sed -i 's/^;//g' /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xdebug.ini && \
|
||||
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# ADD for REMOTE debugging
|
||||
COPY ./xdebug.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
|
||||
|
||||
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
|
||||
|
||||
###########################################################################
|
||||
# Phpdbg:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_PHPDBG=false
|
||||
|
||||
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get install -y --force-yes php${LARADOCK_PHP_VERSION}-phpdbg \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Blackfire:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
ARG BLACKFIRE_CLIENT_ID
|
||||
ENV BLACKFIRE_CLIENT_ID ${BLACKFIRE_CLIENT_ID}
|
||||
ARG BLACKFIRE_CLIENT_TOKEN
|
||||
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
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 && \
|
||||
apt-get update -yqq && \
|
||||
apt-get install blackfire-agent \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# ssh:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_WORKSPACE_SSH=false
|
||||
|
||||
COPY insecure_id_rsa /tmp/id_rsa
|
||||
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
|
||||
|
||||
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
|
||||
rm -f /etc/service/sshd/down && \
|
||||
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
|
||||
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
|
||||
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
|
||||
&& rm -f /tmp/id_rsa* \
|
||||
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
||||
&& chmod 400 /root/.ssh/id_rsa \
|
||||
&& cp -rf /root/.ssh /home/laradock \
|
||||
&& chown -R laradock:laradock /home/laradock/.ssh \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# MongoDB:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_MONGO=false
|
||||
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install mongo && \
|
||||
echo "extension=mongo.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini && \
|
||||
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongo.ini \
|
||||
;fi && \
|
||||
pecl install mongodb && \
|
||||
echo "extension=mongodb.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini && \
|
||||
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# AMQP:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_AMQP=false
|
||||
|
||||
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||
apt-get install librabbitmq-dev -y && \
|
||||
pecl -q install amqp && \
|
||||
echo "extension=amqp.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini && \
|
||||
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-amqp.ini \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# PHP REDIS EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
# Install Php Redis extension
|
||||
printf "\n" | pecl -q install -o -f redis && \
|
||||
echo "extension=redis.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/redis.ini && \
|
||||
phpenmod redis \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Swoole EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_SWOOLE=false
|
||||
|
||||
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||
# Install Php Swoole Extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl -q install swoole-2.0.11; \
|
||||
else \
|
||||
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
||||
pecl install swoole-2.2.0; \
|
||||
else \
|
||||
pecl install swoole; \
|
||||
fi \
|
||||
fi && \
|
||||
echo "extension=swoole.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/swoole.ini && \
|
||||
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/swoole.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-swoole.ini \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Libpng16 EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_LIBPNG=false
|
||||
|
||||
RUN if [ ${INSTALL_LIBPNG} = true ]; then \
|
||||
apt-get update && \
|
||||
apt-get install libpng16-16 \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# IonCube Loader
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_IONCUBE=false
|
||||
|
||||
RUN if [ ${INSTALL_IONCUBE} = true ]; then \
|
||||
# Install the php ioncube loader
|
||||
curl -L -o /tmp/ioncube_loaders_lin_x86-64.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
|
||||
&& tar zxpf /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp \
|
||||
&& mv /tmp/ioncube/ioncube_loader_lin_${LARADOCK_PHP_VERSION}.so $(php -r "echo ini_get('extension_dir');")/ioncube_loader.so \
|
||||
&& echo "zend_extension=ioncube_loader.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/0ioncube.ini \
|
||||
&& rm -rf /tmp/ioncube* \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Drupal Console:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_DRUPAL_CONSOLE=false
|
||||
|
||||
RUN if [ ${INSTALL_DRUPAL_CONSOLE} = true ]; then \
|
||||
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
|
||||
|
||||
###########################################################################
|
||||
# Node / NVM:
|
||||
###########################################################################
|
||||
|
||||
# Check if NVM needs to be installed
|
||||
ARG NODE_VERSION=node
|
||||
ENV NODE_VERSION ${NODE_VERSION}
|
||||
ARG INSTALL_NODE=false
|
||||
ARG INSTALL_NPM_GULP=false
|
||||
ARG INSTALL_NPM_BOWER=false
|
||||
ARG INSTALL_NPM_VUE_CLI=false
|
||||
ARG NPM_REGISTRY
|
||||
ENV NPM_REGISTRY ${NPM_REGISTRY}
|
||||
ENV NVM_DIR /home/laradock/.nvm
|
||||
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
# Install nvm (A Node Version Manager)
|
||||
mkdir -p $NVM_DIR && \
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash \
|
||||
&& . $NVM_DIR/nvm.sh \
|
||||
&& nvm install ${NODE_VERSION} \
|
||||
&& nvm use ${NODE_VERSION} \
|
||||
&& nvm alias ${NODE_VERSION} \
|
||||
&& if [ ${NPM_REGISTRY} ]; then \
|
||||
npm config set registry ${NPM_REGISTRY} \
|
||||
;fi \
|
||||
&& if [ ${INSTALL_NPM_GULP} = true ]; then \
|
||||
npm install -g gulp \
|
||||
;fi \
|
||||
&& if [ ${INSTALL_NPM_BOWER} = true ]; then \
|
||||
npm install -g bower \
|
||||
;fi \
|
||||
&& if [ ${INSTALL_NPM_VUE_CLI} = true ]; then \
|
||||
npm install -g @vue/cli \
|
||||
;fi \
|
||||
&& ln -s `npm bin --global` /home/laradock/.node-bin \
|
||||
;fi
|
||||
|
||||
# Wouldn't execute when added to the RUN statement in the above block
|
||||
# Source NVM when loading bash since ~/.profile isn't loaded on non-login shell
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add NVM binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:/home/laradock/.node-bin
|
||||
|
||||
# Make it so the node modules can be executed with 'docker-compose exec'
|
||||
# We'll create symbolic links into '/usr/local/bin'.
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
find $NVM_DIR -type f -name node -exec ln -s {} /usr/local/bin/node \; && \
|
||||
NODE_MODS_DIR="$NVM_DIR/versions/node/$(node -v)/lib/node_modules" && \
|
||||
ln -s $NODE_MODS_DIR/bower/bin/bower /usr/local/bin/bower && \
|
||||
ln -s $NODE_MODS_DIR/gulp/bin/gulp.js /usr/local/bin/gulp && \
|
||||
ln -s $NODE_MODS_DIR/npm/bin/npm-cli.js /usr/local/bin/npm && \
|
||||
ln -s $NODE_MODS_DIR/npm/bin/npx-cli.js /usr/local/bin/npx && \
|
||||
ln -s $NODE_MODS_DIR/vue-cli/bin/vue /usr/local/bin/vue && \
|
||||
ln -s $NODE_MODS_DIR/vue-cli/bin/vue-init /usr/local/bin/vue-init && \
|
||||
ln -s $NODE_MODS_DIR/vue-cli/bin/vue-list /usr/local/bin/vue-list \
|
||||
;fi
|
||||
|
||||
RUN if [ ${NPM_REGISTRY} ]; then \
|
||||
. ~/.bashrc && npm config set registry ${NPM_REGISTRY} \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# YARN:
|
||||
###########################################################################
|
||||
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_YARN=false
|
||||
ARG YARN_VERSION=latest
|
||||
ENV YARN_VERSION ${YARN_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
|
||||
if [ ${YARN_VERSION} = "latest" ]; then \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash; \
|
||||
else \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \
|
||||
fi && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add YARN binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for YARN
|
||||
ENV PATH $PATH:/home/laradock/.yarn/bin
|
||||
|
||||
###########################################################################
|
||||
# PHP Aerospike:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ARG AEROSPIKE_PHP_REPOSITORY
|
||||
|
||||
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
|
||||
# Fix dependencies for PHPUnit within aerospike extension
|
||||
apt-get -y install sudo wget && \
|
||||
# Install the php aerospike extension
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY} \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
( \
|
||||
cd aerospike-client-php/src/aerospike \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
else \
|
||||
( \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
fi \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& echo 'extension=aerospike.so' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# PHP V8JS:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_V8JS=false
|
||||
|
||||
RUN if [ ${INSTALL_V8JS} = true ]; then \
|
||||
# Install the php V8JS extension
|
||||
add-apt-repository -y ppa:pinepain/libv8-archived \
|
||||
&& apt-get update -yqq \
|
||||
&& apt-get install -y php${LARADOCK_PHP_VERSION}-xml php${LARADOCK_PHP_VERSION}-dev php-pear libv8-5.4 \
|
||||
&& pecl install v8js \
|
||||
&& echo "extension=v8js.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Laravel Envoy:
|
||||
###########################################################################
|
||||
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_LARAVEL_ENVOY=false
|
||||
|
||||
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||
# Install the Laravel Envoy
|
||||
composer global require "laravel/envoy=~1.0" \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Laravel Installer:
|
||||
###########################################################################
|
||||
|
||||
USER laradock
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
ARG INSTALL_LARAVEL_INSTALLER=false
|
||||
|
||||
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
|
||||
# Install the Laravel Installer
|
||||
composer global require "laravel/installer" \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Deployer:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_DEPLOYER=false
|
||||
|
||||
RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
|
||||
# Install the Deployer
|
||||
# Using Phar as currently there is no support for laravel 4 from composer version
|
||||
# Waiting to be resolved on https://github.com/deployphp/deployer/issues/1552
|
||||
curl -LO https://deployer.org/deployer.phar && \
|
||||
mv deployer.phar /usr/local/bin/dep && \
|
||||
chmod +x /usr/local/bin/dep \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Prestissimo:
|
||||
###########################################################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_PRESTISSIMO=false
|
||||
|
||||
RUN if [ ${INSTALL_PRESTISSIMO} = true ]; then \
|
||||
# Install Prestissimo
|
||||
composer global require "hirak/prestissimo" \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Linuxbrew:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_LINUXBREW=false
|
||||
|
||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||
# Preparation
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y build-essential make cmake scons curl git \
|
||||
ruby autoconf automake autoconf-archive \
|
||||
gettext libtool flex bison \
|
||||
libbz2-dev libcurl4-openssl-dev \
|
||||
libexpat-dev libncurses-dev && \
|
||||
# Install the Linuxbrew
|
||||
git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||
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 && \
|
||||
# Setup linuxbrew
|
||||
echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \
|
||||
echo 'export MANPATH="$LINUXBREWHOME/man:$MANPATH"' >> ~/.bashrc && \
|
||||
echo 'export PKG_CONFIG_PATH="$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# SQL SERVER:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_MSSQL=false
|
||||
|
||||
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
apt-get -y install php5.6-sybase freetds-bin freetds-common libsybdb5 \
|
||||
&& php -m | grep -q 'mssql' \
|
||||
&& php -m | grep -q 'pdo_dblib' \
|
||||
;else \
|
||||
###########################################################################
|
||||
# The following steps were taken from
|
||||
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
|
||||
###########################################################################
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
|
||||
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||
apt-get update -yqq && \
|
||||
ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools unixodbc unixodbc-dev libgss3 odbcinst locales && \
|
||||
ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd && \
|
||||
ln -sfn /opt/mssql-tools/bin/bcp /usr/bin/bcp && \
|
||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
pecl install sqlsrv pdo_sqlsrv && \
|
||||
echo "extension=sqlsrv.so" > /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-sqlsrv.ini && \
|
||||
echo "extension=pdo_sqlsrv.so" > /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-pdo_sqlsrv.ini \
|
||||
&& php -m | grep -q 'sqlsrv' \
|
||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||
;fi \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Minio:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
COPY mc/config.json /root/.mc/config.json
|
||||
|
||||
ARG INSTALL_MC=false
|
||||
|
||||
RUN if [ ${INSTALL_MC} = true ]; then\
|
||||
curl -fsSL -o /usr/local/bin/mc https://dl.minio.io/client/mc/release/linux-amd64/mc && \
|
||||
chmod +x /usr/local/bin/mc \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Image optimizers:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y jpegoptim optipng pngquant gifsicle && \
|
||||
if [ ${INSTALL_NODE} = true ]; then \
|
||||
exec bash && . ~/.bashrc && npm install -g svgo \
|
||||
;fi\
|
||||
;fi
|
||||
|
||||
USER laradock
|
||||
|
||||
###########################################################################
|
||||
# Symfony:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SYMFONY=false
|
||||
|
||||
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
|
||||
|
||||
RUN if [ ${INSTALL_PYTHON} = true ]; then \
|
||||
apt-get -y install python python-pip python-dev build-essential \
|
||||
&& python -m pip install --upgrade pip \
|
||||
&& python -m pip install --upgrade virtualenv \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# ImageMagick:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y imagemagick php-imagick \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Terraform:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_TERRAFORM=false
|
||||
|
||||
RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
|
||||
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
|
||||
|
||||
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
# Install the pgsql client
|
||||
apt-get install wget \
|
||||
&& add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" \
|
||||
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install postgresql-client-10 \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# nasm
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update -yqq \
|
||||
&& apt-get -yqq install nasm
|
||||
|
||||
###########################################################################
|
||||
# Dusk Dependencies:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG CHROME_DRIVER_VERSION=stable
|
||||
ENV CHROME_DRIVER_VERSION ${CHROME_DRIVER_VERSION}
|
||||
ARG INSTALL_DUSK_DEPS=false
|
||||
|
||||
RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \
|
||||
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
|
||||
|
||||
###########################################################################
|
||||
# Phalcon:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PHALCON=false
|
||||
ARG LARADOCK_PHALCON_VERSION
|
||||
ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
|
||||
|
||||
RUN if [ $INSTALL_PHALCON = true ]; then \
|
||||
apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c \
|
||||
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \
|
||||
&& unzip -d /tmp/ /tmp/cphalcon.zip \
|
||||
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \
|
||||
&& ./install \
|
||||
&& echo "extension=phalcon.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \
|
||||
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-phalcon.ini \
|
||||
&& rm -rf /tmp/cphalcon* \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# MySQL Client:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_MYSQL_CLIENT=false
|
||||
|
||||
RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install mysql-client \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Check PHP version:
|
||||
###########################################################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP ${LARADOCK_PHP_VERSION}."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
USER root
|
||||
|
||||
# Clean up
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
||||
rm /var/log/lastlog /var/log/faillog
|
||||
|
||||
# Set default work directory
|
||||
WORKDIR /var/www
|
@ -1,696 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'workspace' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/workspace
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/workspace:2.0-56
|
||||
|
||||
LABEL 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 such as ("php5.6-cli", "git", "vim", ....) are
|
||||
# installed on the base image 'laradock/workspace' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/workspace).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_NODE=false
|
||||
# - ...
|
||||
#
|
||||
|
||||
#####################################
|
||||
# Non-Root User:
|
||||
#####################################
|
||||
|
||||
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||
ARG PUID=1000
|
||||
ARG PGID=1000
|
||||
|
||||
ENV PUID ${PUID}
|
||||
ENV PGID ${PGID}
|
||||
|
||||
RUN groupadd -g ${PGID} laradock && \
|
||||
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
|
||||
usermod -p "*" laradock
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
ENV INSTALL_SOAP ${INSTALL_SOAP}
|
||||
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the PHP SOAP extension
|
||||
add-apt-repository -y ppa:ondrej/php && \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install libxml2-dev php5.6-soap \
|
||||
;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
|
||||
#####################################
|
||||
|
||||
ARG TZ=UTC
|
||||
ENV TZ ${TZ}
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
#####################################
|
||||
# Composer:
|
||||
#####################################
|
||||
|
||||
# Add the composer.json
|
||||
COPY ./composer.json /home/laradock/.composer/composer.json
|
||||
|
||||
# Make sure that ~/.composer belongs to laradock
|
||||
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||
USER laradock
|
||||
|
||||
# Check if global install need to be ran
|
||||
ARG COMPOSER_GLOBAL_INSTALL=false
|
||||
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
|
||||
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||
# run the install
|
||||
composer global install \
|
||||
;fi
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
# Export composer vendor path
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Crontab
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
COPY ./crontab /etc/cron.d
|
||||
RUN chmod -R 644 /etc/cron.d
|
||||
|
||||
#####################################
|
||||
# User Aliases
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
COPY ./aliases.sh /root/aliases.sh
|
||||
COPY ./aliases.sh /home/laradock/aliases.sh
|
||||
|
||||
RUN sed -i 's/\r//' /root/aliases.sh && \
|
||||
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||
chown laradock:laradock /home/laradock/aliases.sh && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# xDebug:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get install -y --force-yes php5.6-xdebug && \
|
||||
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 \
|
||||
;fi
|
||||
# ADD for REMOTE debugging
|
||||
COPY ./xdebug.ini /etc/php/5.6/cli/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
# Blackfire:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
ARG BLACKFIRE_CLIENT_ID
|
||||
ARG BLACKFIRE_CLIENT_TOKEN
|
||||
|
||||
ENV BLACKFIRE_CLIENT_ID ${BLACKFIRE_CLIENT_ID}
|
||||
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
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 && \
|
||||
apt-get update -yqq && \
|
||||
apt-get install blackfire-agent \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ssh:
|
||||
#####################################
|
||||
ARG INSTALL_WORKSPACE_SSH=false
|
||||
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
|
||||
|
||||
COPY insecure_id_rsa /tmp/id_rsa
|
||||
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
|
||||
|
||||
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
|
||||
rm -f /etc/service/sshd/down && \
|
||||
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
|
||||
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
|
||||
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
|
||||
&& rm -f /tmp/id_rsa* \
|
||||
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
||||
&& chmod 400 /root/.ssh/id_rsa \
|
||||
&& cp -rf /root/.ssh /home/laradock \
|
||||
&& chown -R laradock:laradock /home/laradock/.ssh \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# MongoDB:
|
||||
#####################################
|
||||
|
||||
# Check if Mongo needs to be installed
|
||||
ARG INSTALL_MONGO=false
|
||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl channel-update pecl.php.net && \
|
||||
pecl install mongodb && \
|
||||
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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_AMQP=false
|
||||
ENV INSTALL_AMQP ${INSTALL_AMQP}
|
||||
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||
apt-get install librabbitmq-dev -y && \
|
||||
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 -f swoole-1.10.1 && \
|
||||
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
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
USER root
|
||||
ENV DRUSH_VERSION 8.1.2
|
||||
ARG INSTALL_DRUSH=false
|
||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install mysql-client && \
|
||||
# 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 && \
|
||||
chmod +x /usr/local/bin/drush && \
|
||||
drush core-status \
|
||||
;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
|
||||
|
||||
#####################################
|
||||
# Node / NVM:
|
||||
#####################################
|
||||
|
||||
# Check if NVM needs to be installed
|
||||
ARG NODE_VERSION=stable
|
||||
ENV NODE_VERSION ${NODE_VERSION}
|
||||
ARG INSTALL_NODE=false
|
||||
ENV INSTALL_NODE ${INSTALL_NODE}
|
||||
ARG NPM_REGISTRY
|
||||
ENV NPM_REGISTRY ${NPM_REGISTRY}
|
||||
ENV NVM_DIR /home/laradock/.nvm
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
# Install nvm (A Node Version Manager)
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash && \
|
||||
. $NVM_DIR/nvm.sh && \
|
||||
nvm install ${NODE_VERSION} && \
|
||||
nvm use ${NODE_VERSION} && \
|
||||
nvm alias ${NODE_VERSION} && \
|
||||
if [ ${NPM_REGISTRY} ]; then \
|
||||
npm config set registry ${NPM_REGISTRY} \
|
||||
;fi && \
|
||||
npm install -g gulp bower vue-cli \
|
||||
;fi
|
||||
|
||||
# Wouldn't execute when added to the RUN statement in the above block
|
||||
# Source NVM when loading bash since ~/.profile isn't loaded on non-login shell
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add NVM binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
RUN if [ ${NPM_REGISTRY} ]; then \
|
||||
. ~/.bashrc && npm config set registry ${NPM_REGISTRY} \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_YARN=false
|
||||
ENV INSTALL_YARN ${INSTALL_YARN}
|
||||
ARG YARN_VERSION=latest
|
||||
ENV YARN_VERSION ${YARN_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
|
||||
if [ ${YARN_VERSION} = "latest" ]; then \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash; \
|
||||
else \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \
|
||||
fi && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add YARN binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
|
||||
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
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz" \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src/aerospike \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& echo 'extension=aerospike.so' >> /etc/php/5.6/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/5.6/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/5.6/cli/conf.d/aerospike.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP V8JS:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_V8JS=false
|
||||
ENV INSTALL_V8JS ${INSTALL_V8JS}
|
||||
|
||||
RUN if [ ${INSTALL_V8JS} = true ]; then \
|
||||
# Install the php V8JS extension
|
||||
add-apt-repository -y ppa:pinepain/libv8-archived \
|
||||
&& apt-get update -yqq \
|
||||
&& apt-get install -y php5.6-xml php5.6-dev php-pear libv8-dev \
|
||||
&& pecl install v8js-0.6.4 \
|
||||
&& echo "extension=v8js.so" >> /etc/php/5.6/cli/php.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Non-root user : PHPUnit path
|
||||
#####################################
|
||||
|
||||
# add ./vendor/bin to non-root user's bashrc (needed for phpunit)
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Envoy:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_LARAVEL_ENVOY=false
|
||||
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
||||
|
||||
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||
# Install the Laravel Envoy
|
||||
composer global require "laravel/envoy=~1.0" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Laravel Installer:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
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:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_DEPLOYER=false
|
||||
ENV INSTALL_DEPLOYER ${INSTALL_DEPLOYER}
|
||||
|
||||
RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
|
||||
# Install the Deployer
|
||||
composer global require "deployer/deployer" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Prestissimo:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_PRESTISSIMO=false
|
||||
ENV INSTALL_PRESTISSIMO ${INSTALL_PRESTISSIMO}
|
||||
|
||||
RUN if [ ${INSTALL_PRESTISSIMO} = true ]; then \
|
||||
# Install Prestissimo
|
||||
composer global require "hirak/prestissimo" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Linuxbrew:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_LINUXBREW=true
|
||||
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||
|
||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||
# Preparation
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y build-essential make cmake scons curl git \
|
||||
ruby autoconf automake autoconf-archive \
|
||||
gettext libtool flex bison \
|
||||
libbz2-dev libcurl4-openssl-dev \
|
||||
libexpat-dev libncurses-dev && \
|
||||
# Install the Linuxbrew
|
||||
git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||
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 && \
|
||||
# Setup linuxbrew
|
||||
echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \
|
||||
echo 'export MANPATH="$LINUXBREWHOME/man:$MANPATH"' >> ~/.bashrc && \
|
||||
echo 'export PKG_CONFIG_PATH="$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# SQL SERVER:
|
||||
#####################################
|
||||
ARG INSTALL_MSSQL=false
|
||||
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||
|
||||
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
|
||||
apt-get -y install php5.6-sybase freetds-bin freetds-common libsybdb5 \
|
||||
&& echo "extension=mssql.so" > /etc/php/5.6/cli/conf.d/20-mssql.ini \
|
||||
&& echo "extension=pdo_dblib.so" > /etc/php/5.6/cli/conf.d/20-pdo_dblib.ini \
|
||||
&& php -m | grep -q 'mssql' \
|
||||
&& php -m | grep -q 'pdo_dblib' \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Minio:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_MC=false
|
||||
ENV INSTALL_MC ${INSTALL_MC}
|
||||
|
||||
COPY mc/config.json /root/.mc/config.json
|
||||
|
||||
RUN if [ ${INSTALL_MC} = true ]; then\
|
||||
curl -fsSL -o /usr/local/bin/mc https://dl.minio.io/client/mc/release/linux-amd64/mc && \
|
||||
chmod +x /usr/local/bin/mc \
|
||||
;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:
|
||||
#####################################
|
||||
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 update -yqq \
|
||||
&& 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 \
|
||||
# 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/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip \
|
||||
&& unzip chromedriver_linux64.zip \
|
||||
&& mv chromedriver /usr/local/bin/ \
|
||||
&& rm chromedriver_linux64.zip \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Check PHP version:
|
||||
#####################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 5.6."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
# Clean up
|
||||
USER root
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Set default work directory
|
||||
WORKDIR /var/www
|
@ -1,710 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'workspace' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/workspace
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/workspace:2.0-70
|
||||
|
||||
LABEL 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 such as ("php7.0-cli", "git", "vim", ....) are
|
||||
# installed on the base image 'laradock/workspace' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/workspace).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_NODE=false
|
||||
# - ...
|
||||
#
|
||||
|
||||
#####################################
|
||||
# Non-Root User:
|
||||
#####################################
|
||||
|
||||
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||
ARG PUID=1000
|
||||
ARG PGID=1000
|
||||
|
||||
ENV PUID ${PUID}
|
||||
ENV PGID ${PGID}
|
||||
|
||||
RUN groupadd -g ${PGID} laradock && \
|
||||
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
|
||||
usermod -p "*" laradock
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
ENV INSTALL_SOAP ${INSTALL_SOAP}
|
||||
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the PHP SOAP extension
|
||||
add-apt-repository -y ppa:ondrej/php && \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install libxml2-dev php7.0-soap \
|
||||
;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
|
||||
#####################################
|
||||
|
||||
ARG TZ=UTC
|
||||
ENV TZ ${TZ}
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
#####################################
|
||||
# Composer:
|
||||
#####################################
|
||||
|
||||
# Add the composer.json
|
||||
COPY ./composer.json /home/laradock/.composer/composer.json
|
||||
|
||||
# Make sure that ~/.composer belongs to laradock
|
||||
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||
USER laradock
|
||||
|
||||
# Check if global install need to be ran
|
||||
ARG COMPOSER_GLOBAL_INSTALL=false
|
||||
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
|
||||
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||
# run the install
|
||||
composer global install \
|
||||
;fi
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
# Export composer vendor path
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Crontab
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
COPY ./crontab /etc/cron.d
|
||||
RUN chmod -R 644 /etc/cron.d
|
||||
|
||||
#####################################
|
||||
# User Aliases
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
COPY ./aliases.sh /root/aliases.sh
|
||||
COPY ./aliases.sh /home/laradock/aliases.sh
|
||||
|
||||
RUN sed -i 's/\r//' /root/aliases.sh && \
|
||||
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||
chown laradock:laradock /home/laradock/aliases.sh && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# xDebug:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get install -y --force-yes php7.0-xdebug && \
|
||||
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 \
|
||||
;fi
|
||||
# ADD for REMOTE debugging
|
||||
COPY ./xdebug.ini /etc/php/7.0/cli/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
# Blackfire:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
ARG BLACKFIRE_CLIENT_ID
|
||||
ARG BLACKFIRE_CLIENT_TOKEN
|
||||
|
||||
ENV BLACKFIRE_CLIENT_ID ${BLACKFIRE_CLIENT_ID}
|
||||
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
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 && \
|
||||
apt-get update -yqq && \
|
||||
apt-get install blackfire-agent \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ssh:
|
||||
#####################################
|
||||
ARG INSTALL_WORKSPACE_SSH=false
|
||||
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
|
||||
|
||||
COPY insecure_id_rsa /tmp/id_rsa
|
||||
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
|
||||
|
||||
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
|
||||
rm -f /etc/service/sshd/down && \
|
||||
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
|
||||
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
|
||||
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
|
||||
&& rm -f /tmp/id_rsa* \
|
||||
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
||||
&& chmod 400 /root/.ssh/id_rsa \
|
||||
&& cp -rf /root/.ssh /home/laradock \
|
||||
&& chown -R laradock:laradock /home/laradock/.ssh \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# MongoDB:
|
||||
#####################################
|
||||
|
||||
# Check if Mongo needs to be installed
|
||||
ARG INSTALL_MONGO=false
|
||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl install mongodb && \
|
||||
echo "extension=mongodb.so" >> /etc/php/7.0/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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_AMQP=false
|
||||
ENV INSTALL_AMQP ${INSTALL_AMQP}
|
||||
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||
apt-get install librabbitmq-dev -y && \
|
||||
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
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
USER root
|
||||
ENV DRUSH_VERSION 8.1.2
|
||||
ARG INSTALL_DRUSH=false
|
||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install mysql-client && \
|
||||
# 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 && \
|
||||
chmod +x /usr/local/bin/drush && \
|
||||
drush core-status \
|
||||
;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
|
||||
|
||||
#####################################
|
||||
# Node / NVM:
|
||||
#####################################
|
||||
|
||||
# Check if NVM needs to be installed
|
||||
ARG NODE_VERSION=stable
|
||||
ENV NODE_VERSION ${NODE_VERSION}
|
||||
ARG INSTALL_NODE=false
|
||||
ENV INSTALL_NODE ${INSTALL_NODE}
|
||||
ARG NPM_REGISTRY
|
||||
ENV NPM_REGISTRY ${NPM_REGISTRY}
|
||||
ENV NVM_DIR /home/laradock/.nvm
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
# Install nvm (A Node Version Manager)
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash && \
|
||||
. $NVM_DIR/nvm.sh && \
|
||||
nvm install ${NODE_VERSION} && \
|
||||
nvm use ${NODE_VERSION} && \
|
||||
nvm alias ${NODE_VERSION} && \
|
||||
if [ ${NPM_REGISTRY} ]; then \
|
||||
npm config set registry ${NPM_REGISTRY} \
|
||||
;fi && \
|
||||
npm install -g gulp bower vue-cli \
|
||||
;fi
|
||||
|
||||
# Wouldn't execute when added to the RUN statement in the above block
|
||||
# Source NVM when loading bash since ~/.profile isn't loaded on non-login shell
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add NVM binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
RUN if [ ${NPM_REGISTRY} ]; then \
|
||||
. ~/.bashrc && npm config set registry ${NPM_REGISTRY} \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_YARN=false
|
||||
ENV INSTALL_YARN ${INSTALL_YARN}
|
||||
ARG YARN_VERSION=latest
|
||||
ENV YARN_VERSION ${YARN_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
|
||||
if [ ${YARN_VERSION} = "latest" ]; then \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash; \
|
||||
else \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \
|
||||
fi && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add YARN binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
|
||||
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
|
||||
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 \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& echo 'extension=aerospike.so' >> /etc/php/7.0/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/7.0/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/7.0/cli/conf.d/aerospike.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP V8JS:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_V8JS=false
|
||||
ENV INSTALL_V8JS ${INSTALL_V8JS}
|
||||
|
||||
RUN if [ ${INSTALL_V8JS} = true ]; then \
|
||||
# Install the php V8JS extension
|
||||
add-apt-repository -y ppa:pinepain/libv8-archived \
|
||||
&& apt-get update -yqq \
|
||||
&& apt-get install -y php7.0-xml php7.0-dev php-pear libv8-5.4 \
|
||||
&& pecl install v8js \
|
||||
&& echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Non-root user : PHPUnit path
|
||||
#####################################
|
||||
|
||||
# add ./vendor/bin to non-root user's bashrc (needed for phpunit)
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Envoy:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_LARAVEL_ENVOY=false
|
||||
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
||||
|
||||
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||
# Install the Laravel Envoy
|
||||
composer global require "laravel/envoy=~1.0" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Laravel Installer:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
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:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_DEPLOYER=false
|
||||
ENV INSTALL_DEPLOYER ${INSTALL_DEPLOYER}
|
||||
|
||||
RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
|
||||
# Install the Deployer
|
||||
composer global require "deployer/deployer" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Prestissimo:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_PRESTISSIMO=false
|
||||
ENV INSTALL_PRESTISSIMO ${INSTALL_PRESTISSIMO}
|
||||
|
||||
RUN if [ ${INSTALL_PRESTISSIMO} = true ]; then \
|
||||
# Install Prestissimo
|
||||
composer global require "hirak/prestissimo" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Linuxbrew:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_LINUXBREW=true
|
||||
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||
|
||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||
# Preparation
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y build-essential make cmake scons curl git \
|
||||
ruby autoconf automake autoconf-archive \
|
||||
gettext libtool flex bison \
|
||||
libbz2-dev libcurl4-openssl-dev \
|
||||
libexpat-dev libncurses-dev && \
|
||||
# Install the Linuxbrew
|
||||
git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||
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 && \
|
||||
# Setup linuxbrew
|
||||
echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \
|
||||
echo 'export MANPATH="$LINUXBREWHOME/man:$MANPATH"' >> ~/.bashrc && \
|
||||
echo 'export PKG_CONFIG_PATH="$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# SQL SERVER:
|
||||
#####################################
|
||||
ARG INSTALL_MSSQL=true
|
||||
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||
|
||||
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
|
||||
#####################################
|
||||
# The following steps were taken from
|
||||
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
|
||||
#####################################
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
|
||||
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||
apt-get update && \
|
||||
ACCEPT_EULA=Y apt-get install -yqq msodbcsql=13.0.1.0-1 mssql-tools=14.0.2.0-1 && \
|
||||
apt-get install -yqq unixodbc-dev-utf16 && \
|
||||
ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd && \
|
||||
ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp && \
|
||||
ACCEPT_EULA=Y apt-get install -yqq \
|
||||
unixodbc \
|
||||
unixodbc-dev \
|
||||
libgss3 \
|
||||
odbcinst \
|
||||
msodbcsql \
|
||||
locales && \
|
||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
pecl install sqlsrv-4.3.0 pdo_sqlsrv-4.3.0 && \
|
||||
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 \
|
||||
&& php -m | grep -q 'sqlsrv' \
|
||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Minio:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_MC=false
|
||||
ENV INSTALL_MC ${INSTALL_MC}
|
||||
|
||||
COPY mc/config.json /root/.mc/config.json
|
||||
|
||||
RUN if [ ${INSTALL_MC} = true ]; then\
|
||||
curl -fsSL -o /usr/local/bin/mc https://dl.minio.io/client/mc/release/linux-amd64/mc && \
|
||||
chmod +x /usr/local/bin/mc \
|
||||
;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:
|
||||
#####################################
|
||||
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 update -yqq \
|
||||
&& 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 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
|
||||
|
||||
#####################################
|
||||
# Check PHP version:
|
||||
#####################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.0."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
# Clean up
|
||||
USER root
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Set default work directory
|
||||
WORKDIR /var/www
|
@ -1,712 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'workspace' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/workspace
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/workspace:2.0-71
|
||||
|
||||
LABEL 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 such as ("php7.1-cli", "git", "vim", ....) are
|
||||
# installed on the base image 'laradock/workspace' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/workspace).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_NODE=false
|
||||
# - ...
|
||||
#
|
||||
|
||||
#####################################
|
||||
# Non-Root User:
|
||||
#####################################
|
||||
|
||||
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||
ARG PUID=1000
|
||||
ARG PGID=1000
|
||||
|
||||
ENV PUID ${PUID}
|
||||
ENV PGID ${PGID}
|
||||
|
||||
RUN groupadd -g ${PGID} laradock && \
|
||||
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
|
||||
usermod -p "*" laradock
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
ENV INSTALL_SOAP ${INSTALL_SOAP}
|
||||
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the PHP SOAP extension
|
||||
add-apt-repository -y ppa:ondrej/php && \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install libxml2-dev php7.1-soap \
|
||||
;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
|
||||
#####################################
|
||||
|
||||
ARG TZ=UTC
|
||||
ENV TZ ${TZ}
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
#####################################
|
||||
# Composer:
|
||||
#####################################
|
||||
|
||||
# Add the composer.json
|
||||
COPY ./composer.json /home/laradock/.composer/composer.json
|
||||
|
||||
# Make sure that ~/.composer belongs to laradock
|
||||
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||
USER laradock
|
||||
|
||||
# Check if global install need to be ran
|
||||
ARG COMPOSER_GLOBAL_INSTALL=false
|
||||
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
|
||||
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||
# run the install
|
||||
composer global install \
|
||||
;fi
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Crontab
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
COPY ./crontab /etc/cron.d
|
||||
RUN chmod -R 644 /etc/cron.d
|
||||
|
||||
#####################################
|
||||
# User Aliases
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
COPY ./aliases.sh /root/aliases.sh
|
||||
COPY ./aliases.sh /home/laradock/aliases.sh
|
||||
|
||||
RUN sed -i 's/\r//' /root/aliases.sh && \
|
||||
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||
chown laradock:laradock /home/laradock/aliases.sh && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# xDebug:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get update && \
|
||||
apt-get install -y --force-yes php7.1-xdebug && \
|
||||
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 \
|
||||
;fi
|
||||
# ADD for REMOTE debugging
|
||||
COPY ./xdebug.ini /etc/php/7.1/cli/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
# Blackfire:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
ARG BLACKFIRE_CLIENT_ID
|
||||
ARG BLACKFIRE_CLIENT_TOKEN
|
||||
|
||||
ENV BLACKFIRE_CLIENT_ID ${BLACKFIRE_CLIENT_ID}
|
||||
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
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 && \
|
||||
apt-get update -yqq && \
|
||||
apt-get install blackfire-agent \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ssh:
|
||||
#####################################
|
||||
ARG INSTALL_WORKSPACE_SSH=false
|
||||
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
|
||||
|
||||
COPY insecure_id_rsa /tmp/id_rsa
|
||||
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
|
||||
|
||||
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
|
||||
rm -f /etc/service/sshd/down && \
|
||||
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
|
||||
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
|
||||
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
|
||||
&& rm -f /tmp/id_rsa* \
|
||||
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
||||
&& chmod 400 /root/.ssh/id_rsa \
|
||||
&& cp -rf /root/.ssh /home/laradock \
|
||||
&& chown -R laradock:laradock /home/laradock/.ssh \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# MongoDB:
|
||||
#####################################
|
||||
|
||||
# Check if Mongo needs to be installed
|
||||
ARG INSTALL_MONGO=false
|
||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl -q install mongodb && \
|
||||
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:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_AMQP=false
|
||||
ENV INSTALL_AMQP ${INSTALL_AMQP}
|
||||
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||
apt-get install librabbitmq-dev -y && \
|
||||
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
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
USER root
|
||||
ENV DRUSH_VERSION 8.1.2
|
||||
ARG INSTALL_DRUSH=false
|
||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install mysql-client && \
|
||||
# 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 && \
|
||||
chmod +x /usr/local/bin/drush && \
|
||||
drush core-status \
|
||||
;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
|
||||
|
||||
#####################################
|
||||
# Node / NVM:
|
||||
#####################################
|
||||
|
||||
# Check if NVM needs to be installed
|
||||
ARG NODE_VERSION=stable
|
||||
ENV NODE_VERSION ${NODE_VERSION}
|
||||
ARG INSTALL_NODE=false
|
||||
ENV INSTALL_NODE ${INSTALL_NODE}
|
||||
ARG NPM_REGISTRY
|
||||
ENV NPM_REGISTRY ${NPM_REGISTRY}
|
||||
ENV NVM_DIR /home/laradock/.nvm
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
# Install nvm (A Node Version Manager)
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash && \
|
||||
. $NVM_DIR/nvm.sh && \
|
||||
nvm install ${NODE_VERSION} && \
|
||||
nvm use ${NODE_VERSION} && \
|
||||
nvm alias ${NODE_VERSION} && \
|
||||
if [ ${NPM_REGISTRY} ]; then \
|
||||
npm config set registry ${NPM_REGISTRY} \
|
||||
;fi && \
|
||||
npm install -g gulp bower vue-cli \
|
||||
;fi
|
||||
|
||||
# Wouldn't execute when added to the RUN statement in the above block
|
||||
# Source NVM when loading bash since ~/.profile isn't loaded on non-login shell
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add NVM binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
RUN if [ ${NPM_REGISTRY} ]; then \
|
||||
. ~/.bashrc && npm config set registry ${NPM_REGISTRY} \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_YARN=false
|
||||
ENV INSTALL_YARN ${INSTALL_YARN}
|
||||
ARG YARN_VERSION=latest
|
||||
ENV YARN_VERSION ${YARN_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
|
||||
if [ ${YARN_VERSION} = "latest" ]; then \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash; \
|
||||
else \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \
|
||||
fi && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add YARN binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
|
||||
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
|
||||
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 \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& echo 'extension=aerospike.so' >> /etc/php/7.1/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/7.1/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/7.1/cli/conf.d/aerospike.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP V8JS:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_V8JS=false
|
||||
ENV INSTALL_V8JS ${INSTALL_V8JS}
|
||||
|
||||
RUN if [ ${INSTALL_V8JS} = true ]; then \
|
||||
# Install the php V8JS extension
|
||||
add-apt-repository -y ppa:pinepain/libv8-archived \
|
||||
&& apt-get update -yqq \
|
||||
&& apt-get install -y php7.1-xml php7.1-dev php-pear libv8-5.4 \
|
||||
&& pecl install v8js \
|
||||
&& echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Non-root user : PHPUnit path
|
||||
#####################################
|
||||
|
||||
# add ./vendor/bin to non-root user's bashrc (needed for phpunit)
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Envoy:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_LARAVEL_ENVOY=false
|
||||
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
||||
|
||||
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||
# Install the Laravel Envoy
|
||||
composer global require "laravel/envoy=~1.0" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Laravel Installer:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
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:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_DEPLOYER=false
|
||||
ENV INSTALL_DEPLOYER ${INSTALL_DEPLOYER}
|
||||
|
||||
RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
|
||||
# Install the Deployer
|
||||
# Using Phar as currently there is no support for laravel 4 from composer version
|
||||
# Waiting to be resolved on https://github.com/deployphp/deployer/issues/1552
|
||||
curl -LO https://deployer.org/deployer.phar && \
|
||||
mv deployer.phar /usr/local/bin/dep && \
|
||||
chmod +x /usr/local/bin/dep \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Prestissimo:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_PRESTISSIMO=false
|
||||
ENV INSTALL_PRESTISSIMO ${INSTALL_PRESTISSIMO}
|
||||
|
||||
RUN if [ ${INSTALL_PRESTISSIMO} = true ]; then \
|
||||
# Install Prestissimo
|
||||
composer global require "hirak/prestissimo" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Linuxbrew:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_LINUXBREW=false
|
||||
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||
|
||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||
# Preparation
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y build-essential make cmake scons curl git \
|
||||
ruby autoconf automake autoconf-archive \
|
||||
gettext libtool flex bison \
|
||||
libbz2-dev libcurl4-openssl-dev \
|
||||
libexpat-dev libncurses-dev && \
|
||||
# Install the Linuxbrew
|
||||
git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||
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 && \
|
||||
# Setup linuxbrew
|
||||
echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \
|
||||
echo 'export MANPATH="$LINUXBREWHOME/man:$MANPATH"' >> ~/.bashrc && \
|
||||
echo 'export PKG_CONFIG_PATH="$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# SQL SERVER:
|
||||
#####################################
|
||||
ARG INSTALL_MSSQL=false
|
||||
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||
|
||||
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
|
||||
#####################################
|
||||
# The following steps were taken from
|
||||
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
|
||||
#####################################
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
|
||||
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||
apt-get update && \
|
||||
ACCEPT_EULA=Y apt-get install -yqq msodbcsql=13.0.1.0-1 mssql-tools=14.0.2.0-1 && \
|
||||
apt-get install -yqq unixodbc-dev-utf16 && \
|
||||
ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd && \
|
||||
ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp && \
|
||||
ACCEPT_EULA=Y apt-get install -yqq \
|
||||
unixodbc \
|
||||
unixodbc-dev \
|
||||
libgss3 \
|
||||
odbcinst \
|
||||
msodbcsql \
|
||||
locales && \
|
||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
pecl install sqlsrv-4.3.0 pdo_sqlsrv-4.3.0 && \
|
||||
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 \
|
||||
&& php -m | grep -q 'sqlsrv' \
|
||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Minio:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_MC=false
|
||||
ENV INSTALL_MC ${INSTALL_MC}
|
||||
|
||||
COPY mc/config.json /root/.mc/config.json
|
||||
|
||||
RUN if [ ${INSTALL_MC} = true ]; then\
|
||||
curl -fsSL -o /usr/local/bin/mc https://dl.minio.io/client/mc/release/linux-amd64/mc && \
|
||||
chmod +x /usr/local/bin/mc \
|
||||
;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:
|
||||
#####################################
|
||||
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 update -yqq \
|
||||
&& 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
|
||||
|
||||
#####################################
|
||||
# Check PHP version:
|
||||
#####################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.1."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
# Clean up
|
||||
USER root
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Set default work directory
|
||||
WORKDIR /var/www
|
@ -1,712 +0,0 @@
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Image Setup
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# To edit the 'workspace' base Image, visit its repository on Github
|
||||
# https://github.com/Laradock/workspace
|
||||
#
|
||||
# To change its version, see the available Tags on the Docker Hub:
|
||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||
#
|
||||
# Note: Base Image name format {image-tag}-{php-version}
|
||||
#
|
||||
|
||||
FROM laradock/workspace:2.0-72
|
||||
|
||||
LABEL 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 such as ("php7.2-cli", "git", "vim", ....) are
|
||||
# installed on the base image 'laradock/workspace' image. If you want
|
||||
# to add more Software's or remove existing one, you need to edit the
|
||||
# base image (https://github.com/Laradock/workspace).
|
||||
#
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional Software's Installation
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
# Optional Software's will only be installed if you set them to `true`
|
||||
# in the `docker-compose.yml` before the build.
|
||||
# Example:
|
||||
# - INSTALL_NODE=false
|
||||
# - ...
|
||||
#
|
||||
|
||||
#####################################
|
||||
# Non-Root User:
|
||||
#####################################
|
||||
|
||||
# Add a non-root user to prevent files being created with root permissions on host machine.
|
||||
ARG PUID=1000
|
||||
ARG PGID=1000
|
||||
|
||||
ENV PUID ${PUID}
|
||||
ENV PGID ${PGID}
|
||||
|
||||
RUN groupadd -g ${PGID} laradock && \
|
||||
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
|
||||
usermod -p "*" laradock
|
||||
|
||||
#####################################
|
||||
# SOAP:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_SOAP=false
|
||||
ENV INSTALL_SOAP ${INSTALL_SOAP}
|
||||
|
||||
RUN if [ ${INSTALL_SOAP} = true ]; then \
|
||||
# Install the PHP SOAP extension
|
||||
add-apt-repository -y ppa:ondrej/php && \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install libxml2-dev php7.2-soap \
|
||||
;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.2-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.2-imap \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Set Timezone
|
||||
#####################################
|
||||
|
||||
ARG TZ=UTC
|
||||
ENV TZ ${TZ}
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
#####################################
|
||||
# Composer:
|
||||
#####################################
|
||||
|
||||
# Add the composer.json
|
||||
COPY ./composer.json /home/laradock/.composer/composer.json
|
||||
|
||||
# Make sure that ~/.composer belongs to laradock
|
||||
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||
USER laradock
|
||||
|
||||
# Check if global install need to be ran
|
||||
ARG COMPOSER_GLOBAL_INSTALL=false
|
||||
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
|
||||
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||
# run the install
|
||||
composer global install \
|
||||
;fi
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Crontab
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
COPY ./crontab /etc/cron.d
|
||||
RUN chmod -R 644 /etc/cron.d
|
||||
|
||||
#####################################
|
||||
# User Aliases
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
COPY ./aliases.sh /root/aliases.sh
|
||||
COPY ./aliases.sh /home/laradock/aliases.sh
|
||||
|
||||
RUN sed -i 's/\r//' /root/aliases.sh && \
|
||||
sed -i 's/\r//' /home/laradock/aliases.sh && \
|
||||
chown laradock:laradock /home/laradock/aliases.sh && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo "# Load Custom Aliases" >> ~/.bashrc && \
|
||||
echo "source ~/aliases.sh" >> ~/.bashrc && \
|
||||
echo "" >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# xDebug:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_XDEBUG=false
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get update && \
|
||||
apt-get install -y --force-yes php7.2-xdebug && \
|
||||
sed -i 's/^;//g' /etc/php/7.2/cli/conf.d/20-xdebug.ini && \
|
||||
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
|
||||
;fi
|
||||
# ADD for REMOTE debugging
|
||||
COPY ./xdebug.ini /etc/php/7.2/cli/conf.d/xdebug.ini
|
||||
|
||||
#####################################
|
||||
# Blackfire:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_BLACKFIRE=false
|
||||
ARG BLACKFIRE_CLIENT_ID
|
||||
ARG BLACKFIRE_CLIENT_TOKEN
|
||||
|
||||
ENV BLACKFIRE_CLIENT_ID ${BLACKFIRE_CLIENT_ID}
|
||||
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
|
||||
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 && \
|
||||
apt-get update -yqq && \
|
||||
apt-get install blackfire-agent \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# ssh:
|
||||
#####################################
|
||||
ARG INSTALL_WORKSPACE_SSH=false
|
||||
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
|
||||
|
||||
COPY insecure_id_rsa /tmp/id_rsa
|
||||
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
|
||||
|
||||
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
|
||||
rm -f /etc/service/sshd/down && \
|
||||
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
|
||||
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
|
||||
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
|
||||
&& rm -f /tmp/id_rsa* \
|
||||
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
|
||||
&& chmod 400 /root/.ssh/id_rsa \
|
||||
&& cp -rf /root/.ssh /home/laradock \
|
||||
&& chown -R laradock:laradock /home/laradock/.ssh \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# MongoDB:
|
||||
#####################################
|
||||
|
||||
# Check if Mongo needs to be installed
|
||||
ARG INSTALL_MONGO=false
|
||||
ENV INSTALL_MONGO ${INSTALL_MONGO}
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl -q install mongodb && \
|
||||
echo "extension=mongodb.so" >> /etc/php/7.2/mods-available/mongodb.ini && \
|
||||
ln -s /etc/php/7.2/mods-available/mongodb.ini /etc/php/7.2/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# AMQP:
|
||||
#####################################
|
||||
|
||||
ARG INSTALL_AMQP=false
|
||||
ENV INSTALL_AMQP ${INSTALL_AMQP}
|
||||
RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||
apt-get install librabbitmq-dev -y && \
|
||||
pecl -q install amqp && \
|
||||
echo "extension=amqp.so" >> /etc/php/7.2/mods-available/amqp.ini && \
|
||||
ln -s /etc/php/7.2/mods-available/amqp.ini /etc/php/7.2/cli/conf.d/30-amqp.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP REDIS EXTENSION FOR PHP 7.2
|
||||
#####################################
|
||||
|
||||
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.2/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.2/mods-available/swoole.ini && \
|
||||
ln -s /etc/php/7.2/mods-available/swoole.ini /etc/php/7.2/cli/conf.d/20-swoole.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Drush:
|
||||
#####################################
|
||||
USER root
|
||||
ENV DRUSH_VERSION 8.1.2
|
||||
ARG INSTALL_DRUSH=false
|
||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||
apt-get update -yqq && \
|
||||
apt-get -y install mysql-client && \
|
||||
# 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 && \
|
||||
chmod +x /usr/local/bin/drush && \
|
||||
drush core-status \
|
||||
;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
|
||||
|
||||
#####################################
|
||||
# Node / NVM:
|
||||
#####################################
|
||||
|
||||
# Check if NVM needs to be installed
|
||||
ARG NODE_VERSION=stable
|
||||
ENV NODE_VERSION ${NODE_VERSION}
|
||||
ARG INSTALL_NODE=false
|
||||
ENV INSTALL_NODE ${INSTALL_NODE}
|
||||
ENV NVM_DIR /home/laradock/.nvm
|
||||
ARG NPM_REGISTRY
|
||||
ENV NPM_REGISTRY ${NPM_REGISTRY}
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
# Install nvm (A Node Version Manager)
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash && \
|
||||
. $NVM_DIR/nvm.sh && \
|
||||
nvm install ${NODE_VERSION} && \
|
||||
nvm use ${NODE_VERSION} && \
|
||||
nvm alias ${NODE_VERSION} && \
|
||||
if [ ${NPM_REGISTRY} ]; then \
|
||||
npm config set registry ${NPM_REGISTRY} \
|
||||
;fi && \
|
||||
npm install -g gulp bower vue-cli \
|
||||
;fi
|
||||
|
||||
# Wouldn't execute when added to the RUN statement in the above block
|
||||
# Source NVM when loading bash since ~/.profile isn't loaded on non-login shell
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add NVM binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add PATH for node
|
||||
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
||||
|
||||
RUN if [ ${NPM_REGISTRY} ]; then \
|
||||
. ~/.bashrc && npm config set registry ${NPM_REGISTRY} \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# YARN:
|
||||
#####################################
|
||||
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_YARN=false
|
||||
ENV INSTALL_YARN ${INSTALL_YARN}
|
||||
ARG YARN_VERSION=latest
|
||||
ENV YARN_VERSION ${YARN_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
|
||||
if [ ${YARN_VERSION} = "latest" ]; then \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash; \
|
||||
else \
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \
|
||||
fi && \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add YARN binaries to root's .bashrc
|
||||
USER root
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_AEROSPIKE=false
|
||||
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
|
||||
|
||||
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 (using 7.2.0-in-progress branch until support for 7.2 on master)
|
||||
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/7.2.0-in-progress.tar.gz" \
|
||||
&& mkdir -p aerospike-client-php \
|
||||
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
|
||||
&& ( \
|
||||
cd aerospike-client-php/src \
|
||||
&& phpize \
|
||||
&& ./build.sh \
|
||||
&& make install \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
&& echo 'extension=aerospike.so' >> /etc/php/7.2/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/7.2/cli/conf.d/aerospike.ini \
|
||||
&& echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/7.2/cli/conf.d/aerospike.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP V8JS:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_V8JS=false
|
||||
ENV INSTALL_V8JS ${INSTALL_V8JS}
|
||||
|
||||
RUN if [ ${INSTALL_V8JS} = true ]; then \
|
||||
# Install the php V8JS extension
|
||||
add-apt-repository -y ppa:pinepain/libv8-archived \
|
||||
&& apt-get update -yqq \
|
||||
&& apt-get install -y php-xml php-dev php-pear libv8-5.4 \
|
||||
&& pecl install v8js \
|
||||
&& echo "extension=v8js.so" >> /etc/php/7.2/cli/php.ini \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Non-root user : PHPUnit path
|
||||
#####################################
|
||||
|
||||
# add ./vendor/bin to non-root user's bashrc (needed for phpunit)
|
||||
USER laradock
|
||||
|
||||
RUN echo "" >> ~/.bashrc && \
|
||||
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
#####################################
|
||||
# Laravel Envoy:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_LARAVEL_ENVOY=false
|
||||
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
|
||||
|
||||
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||
# Install the Laravel Envoy
|
||||
composer global require "laravel/envoy=~1.0" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Laravel Installer:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
|
||||
composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
|
||||
;fi
|
||||
|
||||
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:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_DEPLOYER=false
|
||||
ENV INSTALL_DEPLOYER ${INSTALL_DEPLOYER}
|
||||
|
||||
RUN if [ ${INSTALL_DEPLOYER} = true ]; then \
|
||||
# Install the Deployer
|
||||
# Using Phar as currently there is no support for laravel 4 from composer version
|
||||
# Waiting to be resolved on https://github.com/deployphp/deployer/issues/1552
|
||||
curl -LO https://deployer.org/deployer.phar && \
|
||||
mv deployer.phar /usr/local/bin/dep && \
|
||||
chmod +x /usr/local/bin/dep \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Prestissimo:
|
||||
#####################################
|
||||
USER laradock
|
||||
|
||||
ARG INSTALL_PRESTISSIMO=false
|
||||
ENV INSTALL_PRESTISSIMO ${INSTALL_PRESTISSIMO}
|
||||
|
||||
RUN if [ ${INSTALL_PRESTISSIMO} = true ]; then \
|
||||
# Install Prestissimo
|
||||
composer global require "hirak/prestissimo" \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Linuxbrew:
|
||||
#####################################
|
||||
USER root
|
||||
|
||||
ARG INSTALL_LINUXBREW=false
|
||||
ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
|
||||
|
||||
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
|
||||
# Preparation
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y build-essential make cmake scons curl git \
|
||||
ruby autoconf automake autoconf-archive \
|
||||
gettext libtool flex bison \
|
||||
libbz2-dev libcurl4-openssl-dev \
|
||||
libexpat-dev libncurses-dev && \
|
||||
# Install the Linuxbrew
|
||||
git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
|
||||
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 && \
|
||||
# Setup linuxbrew
|
||||
echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \
|
||||
echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \
|
||||
echo 'export MANPATH="$LINUXBREWHOME/man:$MANPATH"' >> ~/.bashrc && \
|
||||
echo 'export PKG_CONFIG_PATH="$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
|
||||
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# SQL SERVER:
|
||||
#####################################
|
||||
ARG INSTALL_MSSQL=false
|
||||
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||
|
||||
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
|
||||
#####################################
|
||||
# The following steps were taken from
|
||||
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
|
||||
#####################################
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
|
||||
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||
apt-get update && \
|
||||
ACCEPT_EULA=Y apt-get install -yqq msodbcsql=13.0.1.0-1 mssql-tools=14.0.2.0-1 && \
|
||||
apt-get install -yqq unixodbc-dev-utf16 && \
|
||||
ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd && \
|
||||
ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp && \
|
||||
ACCEPT_EULA=Y apt-get install -yqq \
|
||||
unixodbc \
|
||||
unixodbc-dev \
|
||||
libgss3 \
|
||||
odbcinst \
|
||||
msodbcsql \
|
||||
locales && \
|
||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
pecl install sqlsrv-4.3.0 pdo_sqlsrv-4.3.0 && \
|
||||
apt-get install -y locales && \
|
||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
echo "extension=sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-sqlsrv.ini && \
|
||||
echo "extension=pdo_sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-pdo_sqlsrv.ini \
|
||||
&& php -m | grep -q 'sqlsrv' \
|
||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# Minio:
|
||||
#####################################
|
||||
USER root
|
||||
ARG INSTALL_MC=false
|
||||
ENV INSTALL_MC ${INSTALL_MC}
|
||||
|
||||
COPY mc/config.json /root/.mc/config.json
|
||||
|
||||
RUN if [ ${INSTALL_MC} = true ]; then\
|
||||
curl -fsSL -o /usr/local/bin/mc https://dl.minio.io/client/mc/release/linux-amd64/mc && \
|
||||
chmod +x /usr/local/bin/mc \
|
||||
;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:
|
||||
#####################################
|
||||
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 update -yqq \
|
||||
&& 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
|
||||
|
||||
#####################################
|
||||
# Check PHP version:
|
||||
#####################################
|
||||
|
||||
RUN php -v | head -n 1 | grep -q "PHP 7.2."
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
#--------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
# Clean up
|
||||
USER root
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Set default work directory
|
||||
WORKDIR /var/www
|
@ -50,7 +50,7 @@ alias cla="clear && ls -l"
|
||||
alias cll="clear && ls -la"
|
||||
alias cls="clear && ls"
|
||||
alias code="cd /var/www"
|
||||
alias ea="vi ~/aliases"
|
||||
alias ea="vi ~/aliases.sh"
|
||||
|
||||
# Always enable colored `grep` output
|
||||
# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage.
|
||||
@ -68,7 +68,7 @@ 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 seed="php artisan db:seed"
|
||||
alias serve="php artisan serve --quiet &"
|
||||
|
||||
alias phpunit="./vendor/bin/phpunit"
|
||||
@ -107,6 +107,12 @@ alias gd="git --no-pager diff"
|
||||
alias git-revert="git reset --hard && git clean -df"
|
||||
alias gs="git status"
|
||||
alias whoops="git reset --hard && git clean -df"
|
||||
alias glog="git log --oneline --decorate --graph"
|
||||
alias gsh="git show"
|
||||
alias grb="git rebase -i"
|
||||
alias gbr="git branch"
|
||||
alias gc="git commit"
|
||||
alias gck="git checkout"
|
||||
|
||||
# Create a new directory and enter it
|
||||
function mkd() {
|
||||
|
@ -1 +1 @@
|
||||
* * * * * laradock php /var/www/artisan schedule:run >> /dev/null 2>&1
|
||||
* * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1
|
||||
|
10
zookeeper/Dockerfile
Normal file
10
zookeeper/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM zookeeper:latest
|
||||
|
||||
LABEL maintainer="Hyduan <hyduan96@qq.com>"
|
||||
|
||||
VOLUME /data
|
||||
VOLUME /datalog
|
||||
|
||||
EXPOSE 2181
|
||||
|
||||
CMD ["zookeeper"]
|
Reference in New Issue
Block a user