Compare commits

...

111 Commits

Author SHA1 Message Date
be9f7f8346 Merge pull request #935 from xpert13/patch-1
Fix #934. Add extra_hosts to php-worker container
2017-05-13 05:48:25 +03:00
b5431bc061 Merge pull request #933 from bestlong/php-fpm-ldap-support
php-fpm service LDAP support
2017-05-13 05:48:06 +03:00
783da59b59 Merge pull request #929 from ciliehub/master
correct xdebug sed in workspace
2017-05-13 05:47:33 +03:00
41574fe026 Fix #934. Add extra_hosts to php-worker container 2017-05-12 17:17:38 +03:00
848398d443 php-fpm service LDAP support 2017-05-12 19:23:03 +08:00
4dfc794b6e correct xdebug sed in workspace 2017-05-11 22:37:00 +02:00
ac895209f0 Merge pull request #924 from bestlong/fix-mysql-user-cant-see-other-db
Fixing create multiple db MYSQL_USER not show other databases.
2017-05-10 19:58:42 -07:00
b24d6224d9 fixing MYSQL_USER not show other databases. 2017-05-11 09:02:54 +08:00
8a13ae1bb9 Merge pull request #922 from Lednerb/adding-env-aerospike-rethinkdb-mongodb
Added ENV support for aerospike, rethinkdb and mongodb.
2017-05-09 16:25:37 +02:00
a2058ca6f6 Merge branch 'master' into adding-env-aerospike-rethinkdb-mongodb 2017-05-09 14:07:15 +02:00
aab2017bda Merge pull request #910 from wxb/master
add swoole extension config
2017-05-09 07:10:02 +02:00
f9266a509d Merge pull request #921 from Lednerb/updating-caddy
Improved caddy support to latest ENV-config.
2017-05-09 07:06:05 +02:00
546ef0ade6 Added ENV support for aerospike, rethinkdb and mongodb. Part of #763. 2017-05-09 01:31:00 +02:00
4661f1ab0e Improved caddy support to latest ENV-config. 2017-05-09 00:55:15 +02:00
264bec8806 Merge pull request #918 from bestlong/create-multiple-database
MariaDB/Percona Create multiple database
2017-05-08 11:38:20 -07:00
e2d60be3e5 percona container create multiple database. 2017-05-08 23:50:19 +08:00
e1e9830348 mariadb container create multiple database. 2017-05-08 23:49:37 +08:00
0e0dc44a49 Merge pull request #917 from bestlong/mysql-create-multiple-database
MySQL container create multiple databases.
2017-05-08 08:31:32 -07:00
533c8fc7f7 mysql create multiple database. 2017-05-08 22:26:10 +08:00
07651842b6 Merge pull request #912 from zeroc0d3/master
Add network setup in Jenkins container
2017-05-08 02:36:07 +02:00
3796f9f70a Add network setup in Jenkins container 2017-05-08 06:20:43 +07:00
wxb
31d21c74a0 add swoole extension config 2017-05-08 01:42:46 +08:00
c6245fdaf8 Merge pull request #908 from bestlong/fix-hugo-rm-fail
Fixing Travis-CI hugo doc build failed
2017-05-07 18:47:56 +02:00
c539c630ed fix hugo doc build failed 2017-05-08 00:00:19 +08:00
a414e5434f Adding system distro/version to issue template 2017-05-07 17:58:44 +02:00
08b35e63d6 Merge pull request #905 from winfried-van-loon/docs-update
Docs update
2017-05-07 17:39:47 +02:00
1598868445 Merge pull request #906 from winfried-van-loon/855-fix-aerospike
Fixing Aerospike
2017-05-07 17:39:34 +02:00
3134221445 Fixing aerospike 2017-05-07 16:56:15 +02:00
4cf5f3eabf Removing suffix for Aerospike and V8JS 2017-05-07 16:54:55 +02:00
3a3e58de4c Merge branch 'Lednerb-fix-workspace-user-laradock-env' 2017-05-07 15:25:30 +02:00
26ecb09685 Merge branch 'fix-workspace-user-laradock-env' of git://github.com/Lednerb/laradock into Lednerb-fix-workspace-user-laradock-env
# Conflicts:
#	workspace/Dockerfile-56
#	workspace/Dockerfile-70
#	workspace/Dockerfile-71
2017-05-07 15:24:57 +02:00
6db5bc0162 Removing unfinished sentence 2017-05-07 15:18:26 +02:00
eab859fe80 Adding Docker-sync documenation #612
Closes #612
2017-05-07 15:18:09 +02:00
1d6c369c06 Adding Docker version recommendation #895 2017-05-07 15:17:25 +02:00
05faf24582 Merge pull request #903 from bestlong/less-log-info
Less log info
2017-05-07 13:01:53 +02:00
e454d1c8a7 Fixed broken adoption for PUID and PGID for Non-Root User laradock. 2017-05-07 12:43:20 +02:00
f162864e89 apt-get update just need run at first, after add-apt-repository or update apt source list. 2017-05-07 01:17:35 +08:00
69c9202304 apt-get update just need run at first, after add-apt-repository or update apt source list. 2017-05-07 01:08:56 +08:00
100a2eb4ae Merge pull request #901 from bestlong/split-ci-build-job-each-service
Split Travis-CI build jobs and fix php-fpm mssql
2017-05-06 16:56:58 +02:00
59293d7a99 set php-fpm and workspace use sam sqlsrv version. 2017-05-06 18:48:44 +08:00
02958c06fe php-fpm Dockerfile-71 MYSQL
* remove old section
* fill new section
2017-05-06 17:44:32 +08:00
a6e2a6ee59 php-fpm Dockerfile-70 MYSQL
install stable version
2017-05-06 17:44:32 +08:00
cf30e159fb php-fpm Dockerfile-70
fix ini file path
2017-05-06 17:44:32 +08:00
9f12f63aea php-fpm Dockerfile-70
remove duplicate MSSQL section.
2017-05-06 17:44:31 +08:00
e8aad1238e join short time jobs 2017-05-06 17:37:03 +08:00
6843f508fa join short time jobs 2017-05-06 17:08:10 +08:00
3b0e4cd05d join short time jobs 2017-05-06 16:02:23 +08:00
e8b49a9fe5 split build jobs 2017-05-06 15:13:18 +08:00
15d7cd1d35 Merge pull request #897 from bestlong/update-aerospike-client-php-version
Upgrade `aerospike-client-php` version to 3.4.14
2017-05-05 14:02:49 +02:00
61f74b5307 Updating issue template, checkmarks are tasks 2017-05-05 13:29:14 +02:00
a81686d9d0 aerospike-client-php version to 3.4.14 (php-fpm) 2017-05-05 19:13:10 +08:00
2f010506eb aerospike-client-php version to 3.4.14 2017-05-05 18:21:45 +08:00
4f24550463 Merge pull request #891 from bestlong/speed-up-git-clone-and-save-space
git clone only need one depth.
2017-05-05 07:35:48 +02:00
7f7d8839eb Merge pull request #896 from bestlong/fix-mssql
workspace/Dockerfile-71 fill missing MSSQL section
2017-05-05 07:35:22 +02:00
e579b18794 workspace/Dockerfile-70 duplicate MSSQL section. 2017-05-05 13:07:56 +08:00
fde406bafa Dockerfile-71 fill missing MSSQL section 2017-05-05 12:33:09 +08:00
4cb440504b git clone only need one depth. 2017-05-04 17:41:02 +08:00
aa5e8e6666 Merge pull request #890 from bestlong/fix-ci-build-fail-php56
Fixed Travis CI build failed for PHP_VERSION=56
2017-05-04 10:46:49 +02:00
61aabf664e fixing CI build failed 2017-05-04 16:15:28 +08:00
61168cb9d3 Merge pull request #887 from winfried-van-loon/792-v8js
Fixing V8JS
2017-05-04 08:49:26 +02:00
da58d2e9b9 Fixing V8JS
Fixes #792
2017-05-03 23:33:52 +02:00
57616901fd Merge pull request #873 from markhilton/master
Added support for MS SQL server driver for PHP 7.0
2017-05-03 22:52:42 +02:00
623d7aa58d added MS SQL support to workspace 2017-05-03 13:27:24 -04:00
2710723d88 Merge branch 'master' of github.com:markhilton/laradock
* 'master' of github.com:markhilton/laradock:
  Added support for MS SQL server driver for PHP 7.0 - requested changes: - removed cd / && \ - added INSTALL_MSSQL to docker-compose.yml and env-example
  Added support for MS SQL server driver for PHP 7.0
2017-05-03 13:01:51 -04:00
e0d5fb03ed Added support for MS SQL server driver for PHP 7.0 - requested changes:
- removed cd / && \
- added INSTALL_MSSQL to docker-compose.yml and env-example
2017-05-03 13:01:03 -04:00
ca198b85bf Added support for MS SQL server driver for PHP 7.0 2017-05-03 13:01:03 -04:00
f339c3f055 Added support for MS SQL server driver for PHP 7.0 - requested changes:
- removed cd / && \
- added INSTALL_MSSQL to docker-compose.yml and env-example
2017-05-03 12:59:44 -04:00
207cb2929a Merge pull request #885 from bestlong/ci-env-php-version-forget-change
Fix CI build forget update PHP_VERSION in .env
2017-05-03 13:21:18 +02:00
bedb663a8e use CI build config set to update PHP_VERSION in .env 2017-05-03 18:56:01 +08:00
5a5dceb967 Merge pull request #883 from laradock/843-sqlsrv-php71
Add sqlsrv to php-fpm php71
2017-05-02 15:29:45 +02:00
369fbded81 Merge pull request #882 from winfried-van-loon/843-sqlsrv-version
Upgrading sqlsrv to version without error
2017-05-02 15:29:26 +02:00
06b9dd3327 Merge pull request #884 from shahzeb1/master
Created a helpful issues template.
2017-05-02 15:28:48 +02:00
b9b9d52e57 Merge pull request #877 from bestlong/876-ci-not-fail-when-build-error
fixing Travis-CI build problem
2017-05-02 06:14:41 +02:00
767fbddde9 Added where to place the x 2017-05-01 21:01:57 -07:00
3e63afb907 Fixed heading sizes 2017-05-01 20:58:56 -07:00
f6fe749da3 Added a template for issues 2017-05-01 20:58:11 -07:00
e5fbc623eb Helpful template for issues added 2017-05-01 20:56:25 -07:00
02a512dd72 Dockerfile minor formatting 2017-05-01 22:20:25 +02:00
d5883e4bcf Adding sqlsrv to php-fpm PHP71 2017-05-01 22:19:09 +02:00
5815549a9a Upgrading sqlsrv to version without error 2017-05-01 22:17:29 +02:00
b2821b85ab Merge pull request #881 from winfried-van-loon/revert-unintended-md-formatting
Reverting unintended MD formatting
2017-05-01 21:11:57 +02:00
9413f2c86f Reverting unintended MD formatting 2017-05-01 21:00:32 +02:00
47150da482 Merge pull request #880 from laradock/878-webroot
Fixing webroot issues (public folder)
2017-05-01 16:43:30 +02:00
1e6ee4a7b5 Merge pull request #879 from winfried-van-loon/864-870-merging-workspace-dockerfiles
Merging workspace Dockerfiles
2017-05-01 16:43:12 +02:00
1be9df7d61 Fixing apache webroot issue #849 2017-05-01 12:41:55 +02:00
8246863cd7 Partly reverting 690137a3 2017-05-01 12:36:31 +02:00
5291f0f884 Merging workspace Dockerfiles
Should fix #864 and #870
2017-05-01 07:19:13 +02:00
d44873085b Merge pull request #850 from winfried-van-loon/849-apache-webroot
Updating webroots to have the same defaults
2017-04-30 18:46:57 +02:00
956b9209bf fixing ci build problem 2017-04-30 21:52:22 +08:00
080fffba3d Merge branch 'master' into 849-apache-webroot
# Conflicts:
#	DOCUMENTATION/content/getting-started/index.md
2017-04-28 21:14:39 +02:00
fd47c89736 Merge pull request #874 from geekpobre/patch-1
Fix image path on doc guides
2017-04-28 08:37:42 +02:00
ae72b00e29 Fix image path on doc guides
The guides page was showing broken images as the url for those was not taking into consideration the url rewrite. I just added a slash in front of all those urls to serve them from root images folder instead.
2017-04-28 03:24:06 -03:00
74ba0ef0a8 Added support for MS SQL server driver for PHP 7.0 2017-04-27 13:58:27 -04:00
db353fbbdc Merge pull request #854 from winfried-van-loon/792-V8JS-typo
Fixing typo in the workspace V8 args
2017-04-27 08:40:13 -07:00
f6f89fca61 Merge pull request #857 from winfried-van-loon/847-fix-intl-php-fpm
Add apt update to intl install
2017-04-27 08:39:48 -07:00
c979878288 Merge pull request #858 from winfried-van-loon/828-phpmyadmin-adminer-port
Changing PMA/adminer default port to 8080
2017-04-27 08:39:29 -07:00
68ef6235c1 Merge pull request #859 from winfried-van-loon/813-adminer-pg-login
Locking Adminer to stable version
2017-04-27 08:38:57 -07:00
a94b4e259c Merge pull request #860 from winfried-van-loon/workspace-latest-base-image
Updating workspace to use latest base image
2017-04-27 08:38:41 -07:00
988750e737 Merge pull request #867 from lincome/master
cp env-example .env
2017-04-27 08:38:01 -07:00
c7a726cd59 Laravel 项目 2017-04-27 15:05:35 +08:00
6348d032c9 random docs updates 2017-04-24 20:49:25 -04:00
6bf9ac877b Merge pull request #856 from winfried-van-loon/748-workspace-soap
Fixing soap being loaded twice
2017-04-24 10:34:41 +02:00
dde95043f8 Updating workspace to use latest base image 2017-04-24 00:07:07 +02:00
4bf0df8ee1 Locking Adminer to stable version 2017-04-23 23:57:47 +02:00
1db18b1cec Changing PMA/adminer default port to 8080
Fixes issue #828
2017-04-23 23:40:27 +02:00
c6bd305b13 Fixing soap being loaded twice 2017-04-23 23:19:56 +02:00
49f245b37a Add apt update to intl intall
Fixes #847
2017-04-23 21:29:18 +02:00
ef6071bff0 Fixing typo in the workspace V8 args 2017-04-23 21:16:58 +02:00
690137a349 Changing docroots to have the same defaults
Caddy, NGINX and Apache2 should have the same default application paths. The `public/` path suffix is now added in the dotenv file to be able to use Laradock for non-laravel projects as well. Also, updated the documentation.
2017-04-23 20:44:18 +02:00
24d70ad1e3 upgrade base image for dockerfile 7.1 after adding bcmath 2017-04-22 20:45:53 -04:00
1310d633fc update documentation: what is docker 2017-04-22 16:25:25 -04:00
29 changed files with 871 additions and 242 deletions

26
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,26 @@
### Info:
- Docker version (`$ docker --version`):
- Laradock commit (`$ git rev-parse HEAD`):
- System info (Mac, PC, Linux):
- System info disto/version:
### Issue:
##### What seems to be going wrong?
_____
### Expected behavior:
##### What should be happening instead?
_____
### Reproduce:
##### How might we be able to reproduce the error?
_____
### Relevant Code:
```
// place code here
```

View File

@ -4,12 +4,46 @@ services:
- docker - docker
env: env:
matrix: matrix:
- PHP_VERSION=56 - PHP_VERSION=56 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
- PHP_VERSION=70 - PHP_VERSION=70 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
- PHP_VERSION=71 - PHP_VERSION=71 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
- PHP_VERSION=56 BUILD_SERVICE=workspace
- PHP_VERSION=70 BUILD_SERVICE=workspace
- PHP_VERSION=71 BUILD_SERVICE=workspace
- PHP_VERSION=56 BUILD_SERVICE=php-fpm
- PHP_VERSION=70 BUILD_SERVICE=php-fpm
- PHP_VERSION=71 BUILD_SERVICE=php-fpm
- PHP_VERSION=56 BUILD_SERVICE="php-worker hhvm"
- PHP_VERSION=70 BUILD_SERVICE="php-worker hhvm"
- PHP_VERSION=71 BUILD_SERVICE="php-worker hhvm"
- PHP_VERSION=56 BUILD_SERVICE=mssql
- PHP_VERSION=70 BUILD_SERVICE=mssql
- PHP_VERSION=71 BUILD_SERVICE=mssql
- PHP_VERSION=56 BUILD_SERVICE=rethinkdb
- PHP_VERSION=70 BUILD_SERVICE=rethinkdb
- PHP_VERSION=71 BUILD_SERVICE=rethinkdb
- PHP_VERSION=56 BUILD_SERVICE=aerospike
- PHP_VERSION=70 BUILD_SERVICE=aerospike
- PHP_VERSION=71 BUILD_SERVICE=aerospike
- PHP_VERSION=56 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
- PHP_VERSION=70 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
- PHP_VERSION=71 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
- HUGO_VERSION=0.20.2 - HUGO_VERSION=0.20.2
# Installing a newer Docker version
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine
script: ./travis-build.sh script: ./travis-build.sh
deploy: deploy:

View File

@ -153,9 +153,28 @@ You might use the `--no-cache` option if you want full rebuilding (`docker-compo
<br>
<a name="Docker-Sync"></a>
## Docker-Sync
Docker on the Mac [is slow](https://github.com/docker/for-mac/issues/77), at the time of writing. Especially for larger projects, this can be a problem. The problem is [older than March 2016](https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076) - as it's a such a long-running issue, we're including it in the docs here.
The problem originates in bind-mount performance on MacOS. Docker for Mac uses osxfs by default. This is not without reason, it has [a lot of advantages](https://docs.docker.com/docker-for-mac/osxfs/).
Solutions to resolve this issue are easily installed however, we're hoping it'll be fixed by Docker themselves over time. They are currently [adding "cached and delegated" options](https://github.com/docker/for-mac/issues/77#issuecomment-283996750), which is partly available for Docker Edge.
Options are [to switch over to NFS](https://github.com/IFSight/d4m-nfs) which is the simplest. The fastest option is [Docker-Sync "native"](https://github.com/EugenMayer/docker-sync) which is still quite easy to install.
Clone [this repo](https://github.com/EugenMayer/docker-sync-boilerplate) to your machine, copy `default/docker-sync.yml` to your Laradock directory and run `docker-sync-stack start`. Be sure to use `docker-sync-stack clean` to stop and `docker-compose build` to rebuild. More information can be found [in the Docker-sync docs](https://github.com/EugenMayer/docker-sync).
<br> <br>
<a name="Add-Docker-Images"></a> <a name="Add-Docker-Images"></a>
## Add more Software (Docker Images) ## Add more Software (Docker Images)
To add an image (software), just edit the `docker-compose.yml` and add your container details, to do so you need to be familiar with the [docker compose file syntax](https://docs.docker.com/compose/compose-file/). To add an image (software), just edit the `docker-compose.yml` and add your container details, to do so you need to be familiar with the [docker compose file syntax](https://docs.docker.com/compose/compose-file/).
@ -699,6 +718,8 @@ docker-compose up -d mysql phpmyadmin
docker-compose up -d mariadb phpmyadmin docker-compose up -d mariadb phpmyadmin
``` ```
*Note: To use with MariaDB, open `.env` and set `PMA_DB_ENGINE=mysql` to `PMA_DB_ENGINE=mariadb`.*
2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080` 2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`
@ -718,6 +739,7 @@ docker-compose up -d adminer
2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080` 2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`
**Note:** We've locked Adminer to version 4.3.0 as at the time of writing [it contained a major bug](https://sourceforge.net/p/adminer/bugs-and-features/548/) preventing PostgreSQL users from logging in. If that bug is fixed (or if you're not using PostgreSQL) feel free to set Adminer to the latest version within [the Dockerfile](https://github.com/laradock/laradock/blob/master/adminer/Dockerfile#L1): `FROM adminer:latest`
@ -1236,11 +1258,11 @@ You are free to modify the `aliases.sh` as you see fit, adding your own aliases
<br> <br>
a) open the `docker-compose.yml` file a) open the `docker-compose.yml` file
<br> <br>
b) search for the `INSTALL_AEROSPIKE_EXTENSION` argument under the Workspace Container b) search for the `INSTALL_AEROSPIKE` argument under the Workspace Container
<br> <br>
c) set it to `true` c) set it to `true`
<br> <br>
d) search for the `INSTALL_AEROSPIKE_EXTENSION` argument under the PHP-FPM Container d) search for the `INSTALL_AEROSPIKE` argument under the PHP-FPM Container
<br> <br>
e) set it to `true` e) set it to `true`
@ -1251,13 +1273,13 @@ It should be like this:
build: build:
context: ./workspace context: ./workspace
args: args:
- INSTALL_AEROSPIKE_EXTENSION=true - INSTALL_AEROSPIKE=true
... ...
php-fpm: php-fpm:
build: build:
context: ./php-fpm context: ./php-fpm
args: args:
- INSTALL_AEROSPIKE_EXTENSION=true - INSTALL_AEROSPIKE=true
... ...
``` ```

View File

@ -39,23 +39,21 @@ Choose the setup the best suits your needs.
git submodule add https://github.com/Laradock/laradock.git git submodule add https://github.com/Laradock/laradock.git
``` ```
**Notes:** Note: If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `.
- If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `. *To keep track of your Laradock changes, between your projects and also keep Laradock updated [check these docs](/documentation/#keep-track-of-your-laradock-changes)*
- Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. [Check this](/documentation/#keep-track-of-your-laradock-changes)
Your folder structure should look like this: Your folder structure should look like this:
``` ```
+ project-a + project-a
+ laradock-a + laradock-a
+ project-b + project-b
+ laradock-b + laradock-b
``` ```
(It's important to rename the folders differently in each project.) *(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project).*
> **Now jump to the [Usage](#Usage) section.** > **Now jump to the [Usage](#Usage) section.**
@ -77,14 +75,19 @@ Your folder structure should look like this:
2 - Edit your web server sites configuration. 2 - Edit your web server sites configuration.
**In case of NGINX:** open `nginx/sites/default.conf` and change the `root` from `/var/www/public` to `/var/www/{my-project-folder-name}/public`. We'll need to do step 1 of the [Usage](#Usage) section now to make this happen.
*Or you can keep `default.conf` as it is, and create a separate config `my-site.conf` file for it.* ```
cp env-example .env
```
**In case of Apache:** :P At the top, change the `APPLICATION` variable to your project path.
<br> ```
APPLICATION=../project-z/
```
Make sure to replace `project-z` with your project folder name.
> **Now jump to the [Usage](#Usage) section.** > **Now jump to the [Usage](#Usage) section.**
@ -142,11 +145,15 @@ If you are using **Docker Toolbox** (VM), do one of the following:
<br> <br>
We recommend using a Docker version which is newer than 1.13.
<br>
>**Warning:** If you used an older version of Laradock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent as much errors as possible. >**Warning:** If you used an older version of Laradock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent as much errors as possible.
<br> <br>
1 - Enter the laradock folder and rename `env-example` to `.env` 1 - Enter the laradock folder and copy `env-example` to `.env`
```shell ```shell
cp env-example .env cp env-example .env
@ -204,6 +211,4 @@ DB_HOST=mysql
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).* *If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
<br> <br>
5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`. But first don't 5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`.

View File

@ -428,54 +428,54 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
## PHPStorm Settings ## PHPStorm Settings
- Here are some settings that are known to work: - Here are some settings that are known to work:
- `Settings/BuildDeploymentConnection` - `Settings/BuildDeploymentConnection`
- ![Settings/BuildDeploymentConnection](images/photos/PHPStorm/Settings/BuildDeploymentConnection.png) - ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)
- `Settings/BuildDeploymentConnectionMappings` - `Settings/BuildDeploymentConnectionMappings`
- ![Settings/BuildDeploymentConnectionMappings](images/photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png) - ![Settings/BuildDeploymentConnectionMappings](/images/photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png)
- `Settings/BuildDeploymentDebugger` - `Settings/BuildDeploymentDebugger`
- ![Settings/BuildDeploymentDebugger](images/photos/PHPStorm/Settings/BuildDeploymentDebugger.png) - ![Settings/BuildDeploymentDebugger](/images/photos/PHPStorm/Settings/BuildDeploymentDebugger.png)
- `Settings/EditRunConfigurationRemoteWebDebug` - `Settings/EditRunConfigurationRemoteWebDebug`
- ![Settings/EditRunConfigurationRemoteWebDebug](images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png) - ![Settings/EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
- `Settings/EditRunConfigurationRemoteExampleTestDebug` - `Settings/EditRunConfigurationRemoteExampleTestDebug`
- ![Settings/EditRunConfigurationRemoteExampleTestDebug](images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png) - ![Settings/EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
- `Settings/LangsPHPDebug` - `Settings/LangsPHPDebug`
- ![Settings/LangsPHPDebug](images/photos/PHPStorm/Settings/LangsPHPDebug.png) - ![Settings/LangsPHPDebug](/images/photos/PHPStorm/Settings/LangsPHPDebug.png)
- `Settings/LangsPHPInterpreters` - `Settings/LangsPHPInterpreters`
- ![Settings/LangsPHPInterpreters](images/photos/PHPStorm/Settings/LangsPHPInterpreters.png) - ![Settings/LangsPHPInterpreters](/images/photos/PHPStorm/Settings/LangsPHPInterpreters.png)
- `Settings/LangsPHPPHPUnit` - `Settings/LangsPHPPHPUnit`
- ![Settings/LangsPHPPHPUnit](images/photos/PHPStorm/Settings/LangsPHPPHPUnit.png) - ![Settings/LangsPHPPHPUnit](/images/photos/PHPStorm/Settings/LangsPHPPHPUnit.png)
- `Settings/LangsPHPServers` - `Settings/LangsPHPServers`
- ![Settings/LangsPHPServers](images/photos/PHPStorm/Settings/LangsPHPServers.png) - ![Settings/LangsPHPServers](/images/photos/PHPStorm/Settings/LangsPHPServers.png)
- `RemoteHost` - `RemoteHost`
To switch on this view, go to: `Menu/Tools/Deployment/Browse Remote Host`. To switch on this view, go to: `Menu/Tools/Deployment/Browse Remote Host`.
- ![RemoteHost](images/photos/PHPStorm/RemoteHost.png) - ![RemoteHost](/images/photos/PHPStorm/RemoteHost.png)
- `RemoteWebDebug` - `RemoteWebDebug`
- ![DebugRemoteOn](images/photos/PHPStorm/DebugRemoteOn.png) - ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
- `EditRunConfigurationRemoteWebDebug` - `EditRunConfigurationRemoteWebDebug`
Go to: `Menu/Run/Edit Configurations`. Go to: `Menu/Run/Edit Configurations`.
- ![EditRunConfigurationRemoteWebDebug](images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png) - ![EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
- `EditRunConfigurationRemoteExampleTestDebug` - `EditRunConfigurationRemoteExampleTestDebug`
Go to: `Menu/Run/Edit Configurations`. Go to: `Menu/Run/Edit Configurations`.
- ![EditRunConfigurationRemoteExampleTestDebug](images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png) - ![EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
- `WindowsFirewallAllowedApps` - `WindowsFirewallAllowedApps`
Go to: `Control Panel\All Control Panel Items\Windows Firewall\Allowed apps`. Go to: `Control Panel\All Control Panel Items\Windows Firewall\Allowed apps`.
- ![WindowsFirewallAllowedApps.png](images/photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png) - ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png)
- `hosts` - `hosts`
Edit: `C:\Windows\System32\drivers\etc\hosts`. Edit: `C:\Windows\System32\drivers\etc\hosts`.
- ![WindowsFirewallAllowedApps.png](images/photos/PHPStorm/Settings/hosts.png) - ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/hosts.png)
- [Enable xDebug on php-fpm](#enablePhpXdebug) - [Enable xDebug on php-fpm](#enablePhpXdebug)
@ -497,7 +497,7 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
- right-click on `tests/ExampleTest.php` - right-click on `tests/ExampleTest.php`
- Select: `Debug 'ExampleTest.php'`. - Select: `Debug 'ExampleTest.php'`.
- Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH! - Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH!
- ![Remote Test Debugging Success](images/photos/PHPStorm/RemoteTestDebuggingSuccess.png) - ![Remote Test Debugging Success](/images/photos/PHPStorm/RemoteTestDebuggingSuccess.png)
<a name="UsagePHPStormDebugSite"></a> <a name="UsagePHPStormDebugSite"></a>
@ -508,13 +508,13 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
`.php-fpm/xdebug stop` `.php-fpm/xdebug stop`
- Start Remote Debugging - Start Remote Debugging
- ![DebugRemoteOn](images/photos/PHPStorm/DebugRemoteOn.png) - ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
- Open to edit: `bootstrap/app.php` - Open to edit: `bootstrap/app.php`
- Add a BreakPoint on line 14: `$app = new Illuminate\Foundation\Application(` - Add a BreakPoint on line 14: `$app = new Illuminate\Foundation\Application(`
- Reload [Laravel Site](http://laravel/) - Reload [Laravel Site](http://laravel/)
- Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH! - Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH!
- ![Remote Debugging Success](images/photos/PHPStorm/RemoteDebuggingSuccess.png) - ![Remote Debugging Success](/images/photos/PHPStorm/RemoteDebuggingSuccess.png)
<a name="SSHintoWorkspace"></a> <a name="SSHintoWorkspace"></a>
@ -533,14 +533,14 @@ Assuming that you are in laradock folder, type:
[Kitty](http://www.9bis.net/kitty/) KiTTY is a fork from version 0.67 of PuTTY. [Kitty](http://www.9bis.net/kitty/) KiTTY is a fork from version 0.67 of PuTTY.
- Here are some settings that are working for me: - Here are some settings that are working for me:
- ![Session](images/photos/KiTTY/Session.png) - ![Session](/images/photos/KiTTY/Session.png)
- ![Terminal](images/photos/KiTTY/Terminal.png) - ![Terminal](/images/photos/KiTTY/Terminal.png)
- ![Window](images/photos/KiTTY/Window.png) - ![Window](/images/photos/KiTTY/Window.png)
- ![WindowAppearance](images/photos/KiTTY/WindowAppearance.png) - ![WindowAppearance](/images/photos/KiTTY/WindowAppearance.png)
- ![Connection](images/photos/KiTTY/Connection.png) - ![Connection](/images/photos/KiTTY/Connection.png)
- ![ConnectionData](images/photos/KiTTY/ConnectionData.png) - ![ConnectionData](/images/photos/KiTTY/ConnectionData.png)
- ![ConnectionSSH](images/photos/KiTTY/ConnectionSSH.png) - ![ConnectionSSH](/images/photos/KiTTY/ConnectionSSH.png)
- ![ConnectionSSHAuth](images/photos/KiTTY/ConnectionSSHAuth.png) - ![ConnectionSSHAuth](/images/photos/KiTTY/ConnectionSSHAuth.png)
- ![TerminalShell](images/photos/KiTTY/TerminalShell.png) - ![TerminalShell](/images/photos/KiTTY/TerminalShell.png)

View File

@ -1,7 +0,0 @@
---
title: Welcome
type: index
weight: 0
---
Welcome to Laradock :)

View File

@ -118,8 +118,10 @@ If you can't find your Software in the list, build it yourself and sumit it. Con
<a name="what-is-docker"></a> <a name="what-is-docker"></a>
## What is Docker? ## What is Docker?
[Docker](https://www.docker.com) is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of [operating-system-level virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) on Linux, Mac OS and Windows. [Docker](https://www.docker.com) is an open platform for developing, shipping, and running applications.
Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
With Docker, you can manage your infrastructure in the same ways you manage your applications.
By taking advantage of Dockers methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.

View File

@ -64,20 +64,23 @@ Laradock 努力简化创建开发环境过程。
让我们了解使用它安装 `NGINX`, `PHP`, `Composer`, `MySQL``Redis`,然后运行 `Laravel` 让我们了解使用它安装 `NGINX`, `PHP`, `Composer`, `MySQL``Redis`,然后运行 `Laravel`
1. 将 Laradock 放到你的 Laravel 项目中: 1. 将 Laradock 放到你的 Laravel 项目中:
```bash ```bash
git clone https://github.com/laradock/laradock.git git clone https://github.com/laradock/laradock.git
``` ```
2. 进入 Laradock 目录,然后运行这些容器。 2. 进入 Laradock 目录
```bash
cp env-example .env
```
3. 运行这些容器。
```bash ```bash
docker-compose up -d nginx mysql redis docker-compose up -d nginx mysql redis
``` ```
3. 打开你的 `.env` 文件,然后设置 `mysql``DB_HOST``redis``REDIS_HOST` 4. 打开你的Laravel 项目的 `.env` 文件,然后设置 `mysql` 的 `DB_HOST` 和 `redis` 的`REDIS_HOST`。
4. 打开浏览器,访问 localhost 5. 打开浏览器,访问 localhost
<a name="features"></a> <a name="features"></a>
### 特点 ### 特点
@ -461,7 +464,7 @@ REDIS_HOST=redis
], ],
``` ```
3 - 启用 Redis 缓存或者开启 Session 管理也在 `.env` 文件中用 `redis` 替换默认 `file` 设置 `CACHE_DRIVER``SESSION_DRIVER` 3 - 启用 Redis 缓存或者开启 Session 管理也在 `.env` 文件中用 `redis` 替换默认 `file` 设置 `CACHE_DRIVER` 和 `SESSION_DRIVER`
```env ```env
CACHE_DRIVER=redis CACHE_DRIVER=redis

View File

@ -1,4 +1,7 @@
FROM adminer:latest 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/
MAINTAINER Patrick Artounian <partounian@gmail.com> MAINTAINER Patrick Artounian <partounian@gmail.com>

View File

@ -6,13 +6,13 @@ ARG PHP_SOCKET=php-fpm:9000
ENV WEB_PHP_SOCKET=$PHP_SOCKET ENV WEB_PHP_SOCKET=$PHP_SOCKET
ENV WEB_DOCUMENT_ROOT=/var/www/ ENV WEB_DOCUMENT_ROOT=/var/www/public/
EXPOSE 80 443 EXPOSE 80 443
WORKDIR /var/www/ WORKDIR /var/www/public/
ADD vhost.conf /etc/apache2/sites-enabled/vhost.conf COPY vhost.conf /etc/apache2/sites-enabled/vhost.conf
ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"] ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"]

View File

@ -1,9 +1,9 @@
<VirtualHost *:80> <VirtualHost *:80>
ServerName laradock.dev ServerName laradock.dev
DocumentRoot /var/www/html/ DocumentRoot /var/www/public/
Options Indexes FollowSymLinks Options Indexes FollowSymLinks
<Directory "/var/www/html/"> <Directory "/var/www/public/">
AllowOverride All AllowOverride All
<IfVersion < 2.4> <IfVersion < 2.4>
Allow from all Allow from all

View File

@ -19,11 +19,12 @@ services:
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP} - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO} - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN} - INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH} - INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
- INSTALL_AEROSPIKE_EXTENSION=${WORKSPACE_INSTALL_AEROSPIKE_EXTENSION} - INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
- INSTALL_V8JS_EXTENSION=${WORKSPACE_INSTALL_INSTALL_V8JS_EXTENSION} - INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL} - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH} - INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY} - INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
@ -59,17 +60,19 @@ services:
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP} - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO} - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
- INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL}
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE} - INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
- INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS} - INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE} - INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
- INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION} - INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE}
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI} - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
- INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER} - INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL} - INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT} - INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
dockerfile: "Dockerfile-${PHP_VERSION}" dockerfile: "Dockerfile-${PHP_VERSION}"
volumes_from: volumes_from:
- applications - applications
@ -95,6 +98,8 @@ services:
- applications - applications
depends_on: depends_on:
- workspace - workspace
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
networks: networks:
- backend - backend
@ -192,6 +197,7 @@ services:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes: volumes:
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql - ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports: ports:
- "${MYSQL_PORT}:3306" - "${MYSQL_PORT}:3306"
networks: networks:
@ -295,7 +301,7 @@ services:
mongo: mongo:
build: ./mongo build: ./mongo
ports: ports:
- "27017:27017" - "${MONGODB_PORT}:27017"
volumes: volumes:
- ${DATA_SAVE_PATH}/mongo:/data/db - ${DATA_SAVE_PATH}/mongo:/data/db
networks: networks:
@ -306,7 +312,7 @@ services:
rethinkdb: rethinkdb:
build: ./rethinkdb build: ./rethinkdb
ports: ports:
- "8090:8080" - "${RETHINKDB_PORT}:8080"
volumes: volumes:
- ${DATA_SAVE_PATH}/rethinkdb:/data/rethinkdb_data - ${DATA_SAVE_PATH}/rethinkdb:/data/rethinkdb_data
networks: networks:
@ -332,10 +338,10 @@ services:
volumes: volumes:
- ${DATA_SAVE_PATH}/aerospike:/opt/aerospike/data - ${DATA_SAVE_PATH}/aerospike:/opt/aerospike/data
ports: ports:
- "3000:3000" - "${AEROSPIKE_SERVICE_PORT}:3000"
- "3001:3001" - "${AEROSPIKE_FABRIC_PORT}:3001"
- "3002:3002" - "${AEROSPIKE_HEARTBEAT_PORT}:3002"
- "3003:3003" - "${AEROSPIKE_INFO_PORT}:3003"
networks: networks:
- backend - backend
@ -396,16 +402,15 @@ services:
caddy: caddy:
build: ./caddy build: ./caddy
ports:
- "80:80"
- "443:443"
- "2015:2015"
volumes_from: volumes_from:
- applications - applications
volumes: volumes:
- ./caddy/Caddyfile:/etc/Caddyfile - ${CADDY_CUSTOM_CADDYFILE}:/etc/Caddyfile
- ./logs/caddy:/var/log/caddy - ${CADDY_HOST_LOG_PATH}:/var/log/caddy
- caddy:/root/.caddy - ${DATA_SAVE_PATH}:/root/.caddy
ports:
- "${CADDY_HOST_HTTP_PORT}:80"
- "${CADDY_HOST_HTTPS_PORT}:443"
depends_on: depends_on:
- php-fpm - php-fpm
networks: networks:
@ -566,6 +571,10 @@ services:
volumes: volumes:
- ${JENKINS_HOME}:/var/jenkins_home - ${JENKINS_HOME}:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
networks:
- frontend
- backend
### Networks Setup ############################################ ### Networks Setup ############################################

View File

@ -32,11 +32,12 @@ PHP_INTERPRETER=php-fpm
WORKSPACE_INSTALL_XDEBUG=false WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_SOAP=false WORKSPACE_INSTALL_SOAP=false
WORKSPACE_INSTALL_MONGO=false WORKSPACE_INSTALL_MONGO=false
WORKSPACE_INSTALL_MSSQL=false
WORKSPACE_INSTALL_NODE=false WORKSPACE_INSTALL_NODE=false
WORKSPACE_INSTALL_YARN=false WORKSPACE_INSTALL_YARN=false
WORKSPACE_INSTALL_DRUSH=false WORKSPACE_INSTALL_DRUSH=false
WORKSPACE_INSTALL_AEROSPIKE_EXTENSION=false WORKSPACE_INSTALL_AEROSPIKE=false
WORKSPACE_INSTALL_INSTALL_V8JS_EXTENSION=false WORKSPACE_INSTALL_V8JS=false
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
WORKSPACE_INSTALL_WORKSPACE_SSH=false WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_LARAVEL_ENVOY=false WORKSPACE_INSTALL_LARAVEL_ENVOY=false
@ -54,6 +55,7 @@ WORKSPACE_SSH_PORT=2222
PHP_FPM_INSTALL_XDEBUG=false PHP_FPM_INSTALL_XDEBUG=false
PHP_FPM_INSTALL_MONGO=false PHP_FPM_INSTALL_MONGO=false
PHP_FPM_INSTALL_MSSQL=false
PHP_FPM_INSTALL_SOAP=false PHP_FPM_INSTALL_SOAP=false
PHP_FPM_INSTALL_ZIP_ARCHIVE=false PHP_FPM_INSTALL_ZIP_ARCHIVE=false
PHP_FPM_INSTALL_BCMATH=false PHP_FPM_INSTALL_BCMATH=false
@ -61,11 +63,13 @@ PHP_FPM_INSTALL_PHPREDIS=false
PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_MEMCACHED=false
PHP_FPM_INSTALL_OPCACHE=false PHP_FPM_INSTALL_OPCACHE=false
PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_EXIF=false
PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false PHP_FPM_INSTALL_AEROSPIKE=false
PHP_FPM_INSTALL_MYSQLI=false PHP_FPM_INSTALL_MYSQLI=false
PHP_FPM_INSTALL_TOKENIZER=false PHP_FPM_INSTALL_TOKENIZER=false
PHP_FPM_INSTALL_INTL=false PHP_FPM_INSTALL_INTL=false
PHP_FPM_INSTALL_GHOSTSCRIPT=false PHP_FPM_INSTALL_GHOSTSCRIPT=false
PHP_FPM_INSTALL_LDAP=false
PHP_FPM_INSTALL_SWOOLE=false
### NGINX ############################################################################################################## ### NGINX ##############################################################################################################
@ -156,7 +160,7 @@ MINIO_PORT=9000
### ADMINER ############################################################################################################ ### ADMINER ############################################################################################################
ADM_PORT=88 ADM_PORT=8080
### PHP MY ADMIN ####################################################################################################### ### PHP MY ADMIN #######################################################################################################
@ -169,7 +173,7 @@ PMA_DB_ENGINE=mysql
PMA_USER=default PMA_USER=default
PMA_PASSWORD=secret PMA_PASSWORD=secret
PMA_ROOT_PASSWORD=secret PMA_ROOT_PASSWORD=secret
PMA_PORT=88 PMA_PORT=8080
### VARNISH ############################################################################################################ ### VARNISH ############################################################################################################
@ -213,6 +217,28 @@ BLACKFIRE_CLIENT_TOKEN=<client_token>
BLACKFIRE_SERVER_ID=<server_id> BLACKFIRE_SERVER_ID=<server_id>
BLACKFIRE_SERVER_TOKEN=<server_token> BLACKFIRE_SERVER_TOKEN=<server_token>
### AEROSPIKE ##########################################################################################################
AEROSPIKE_SERVICE_PORT=3000
AEROSPIKE_FABRIC_PORT=3001
AEROSPIKE_HEARTBEAT_PORT=3002
AEROSPIKE_INFO_PORT=3003
### RETHINKDB ##########################################################################################################
RETHINKDB_PORT=8090
### MONGODB ############################################################################################################
MONGODB_PORT=27017
### CADDY ##############################################################################################################
CADDY_HOST_HTTP_PORT=80
CADDY_HOST_HTTPS_PORT=443
CADDY_HOST_LOG_PATH=./logs/caddy
CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
##### TO BE CONTINUE ................................. ##### TO BE CONTINUE .................................
@ -239,4 +265,3 @@ PHP_IDE_CONFIG=serverName=laradock
# Fix for windows users to make sure the application path works. # Fix for windows users to make sure the application path works.
COMPOSE_CONVERT_WINDOWS_PATHS=1 COMPOSE_CONVERT_WINDOWS_PATHS=1

View File

@ -0,0 +1 @@
*.sql

View File

@ -0,0 +1,8 @@
###
### Copy createdb.sql.example to createdb.sql
### then uncomment and set database name to create you need databases
###
#CREATE DATABASE IF NOT EXISTS `dev_db_1` ;
#CREATE DATABASE IF NOT EXISTS `dev_db_2` ;
#CREATE DATABASE IF NOT EXISTS `dev_db_3` ;

View File

@ -0,0 +1 @@
*.sql

View File

@ -0,0 +1,28 @@
###
### Copy createdb.sql.example to createdb.sql
### then uncomment then set database name and username to create you need databases
#
# example: .env MYSQL_USER=appuser and need db name is myshop_db
#
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
#
###
### this sql script is auto run when mysql container start and $DATA_SAVE_PATH/mysql not exists.
###
### if your $DATA_SAVE_PATH/mysql is exists and you do not want to delete it, you can run by manual execution:
###
### docker-compose exec mysql bash
### mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
###
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_2` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_2`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_3` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_3`.* TO 'default'@'%' ;
FLUSH PRIVILEGES ;

View File

@ -15,7 +15,7 @@ server {
try_files $uri /index.php =404; try_files $uri /index.php =404;
fastcgi_pass php-upstream; fastcgi_pass php-upstream;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_buffers 16 16k; fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k; fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
@ -24,12 +24,9 @@ server {
location ~ /\.ht { location ~ /\.ht {
deny all; deny all;
} }
location /.well-known/acme-challenge/ { location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/; root /var/www/letsencrypt/;
log_not_found off; log_not_found off;
} }
} }

View File

@ -15,7 +15,7 @@ server {
try_files $uri /index.php =404; try_files $uri /index.php =404;
fastcgi_pass php-upstream; fastcgi_pass php-upstream;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_buffers 16 16k; fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k; fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
@ -24,12 +24,9 @@ server {
location ~ /\.ht { location ~ /\.ht {
deny all; deny all;
} }
location /.well-known/acme-challenge/ { location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/; root /var/www/letsencrypt/;
log_not_found off; log_not_found off;
} }
} }

View File

@ -15,7 +15,7 @@ server {
try_files $uri /index.php =404; try_files $uri /index.php =404;
fastcgi_pass php-upstream; fastcgi_pass php-upstream;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_buffers 16 16k; fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k; fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
@ -24,12 +24,9 @@ server {
location ~ /\.ht { location ~ /\.ht {
deny all; deny all;
} }
location /.well-known/acme-challenge/ { location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/; root /var/www/letsencrypt/;
log_not_found off; log_not_found off;
} }
} }

View File

@ -0,0 +1 @@
*.sql

View File

@ -0,0 +1,8 @@
###
### Copy createdb.sql.example to createdb.sql
### then uncomment and set database name to create you need databases
###
#CREATE DATABASE IF NOT EXISTS `dev_db_1` ;
#CREATE DATABASE IF NOT EXISTS `dev_db_2` ;
#CREATE DATABASE IF NOT EXISTS `dev_db_3` ;

View File

@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ARG INSTALL_SOAP=false ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \ RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the soap extension # Install the soap extension
apt-get -y update && \ apt-get update -yqq && \
apt-get -y install libxml2-dev php-soap && \ apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \ docker-php-ext-install soap \
;fi ;fi
@ -92,6 +92,17 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
&& docker-php-ext-enable redis \ && docker-php-ext-enable redis \
;fi ;fi
#####################################
# Swoole EXTENSION FOR PHP 5
#####################################
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
;fi
##################################### #####################################
# MongoDB: # MongoDB:
##################################### #####################################
@ -148,13 +159,13 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
# PHP Aerospike: # PHP Aerospike:
##################################### #####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging # Copy aerospike configration for remote debugging
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
# Install the php aerospike extension # Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
&& mkdir -p aerospike-client-php \ && mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \ && ( \
@ -219,10 +230,22 @@ RUN if [ ${INSTALL_INTL} = true ]; then \
ARG INSTALL_GHOSTSCRIPT=false ARG INSTALL_GHOSTSCRIPT=false
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \ RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
# Install the ghostscript extension for PDF editing # Install the ghostscript extension for PDF editing
apt-get update && \ apt-get update -yqq && \
apt-get install -y poppler-utils ghostscript \ apt-get install -y poppler-utils ghostscript \
;fi ;fi
#####################################
# LDAP:
#####################################
ARG INSTALL_LDAP=false
RUN if [ ${INSTALL_LDAP} = true ]; then \
apt-get update -yqq && \
apt-get install -y libldap2-dev && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
docker-php-ext-install ldap \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ARG INSTALL_SOAP=false ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \ RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the soap extension # Install the soap extension
apt-get -y update && \ apt-get update -yqq && \
apt-get -y install libxml2-dev php-soap && \ apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \ docker-php-ext-install soap \
;fi ;fi
@ -89,6 +89,17 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
&& docker-php-ext-enable redis \ && docker-php-ext-enable redis \
;fi ;fi
#####################################
# Swoole EXTENSION FOR PHP 7
#####################################
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
;fi
##################################### #####################################
# MongoDB: # MongoDB:
##################################### #####################################
@ -156,13 +167,13 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
# PHP Aerospike: # PHP Aerospike:
##################################### #####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging # Copy aerospike configration for remote debugging
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
# Install the php aerospike extension # Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
&& mkdir -p aerospike-client-php \ && mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \ && ( \
@ -206,17 +217,56 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
;fi ;fi
##################################### #####################################
# SQL SERVER: # Human Language and Character Encoding Support:
##################################### #####################################
ARG MSSQL=false ARG INSTALL_INTL=false
RUN if [ ${MSSQL} = true ]; then \ 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 if [ ${INSTALL_MSSQL} = true ]; then \
##################################### #####################################
# Install Depenencies: # Install Depenencies:
##################################### #####################################
apt-get update && \ apt-get update -yqq && \
apt-get install -y --force-yes wget apt-transport-https curl freetds-common php5-odbc libsybdb5 freetds-bin unixodbc unixodbc-dev php5-sybase && \ apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
##################################### #####################################
# The following steps were taken from # The following steps were taken from
@ -231,16 +281,17 @@ RUN if [ ${MSSQL} = true ]; then \
| tee /etc/apt/sources.list.d/dotdeb.list \ | tee /etc/apt/sources.list.d/dotdeb.list \
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \ && wget -qO- https://www.dotdeb.org/dotdeb.gpg \
| apt-key add - \ | apt-key add - \
&& apt-get update \ && apt-get update -yqq \
&& apt-get upgrade -qq && \ && apt-get upgrade -qq && \
# Install UnixODBC # Install UnixODBC
# Compile odbc_config as it is not part of unixodbc package # Compile odbc_config as it is not part of unixodbc package
apt-get update -yqq && \
apt-get install -y whiptail \ apt-get install -y whiptail \
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \ unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \ && dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
&& cd unixodbc-*/ \ && cd unixodbc-*/ \
&& dpkg-buildpackage -uc -us -B -d \ && ./configure && make && make install \
&& cp -v ./exe/odbc_config /usr/local/bin/ && \ && cp -v ./exe/odbc_config /usr/local/bin/ && \
# Fake uname for install.sh # Fake uname for install.sh
@ -257,24 +308,16 @@ RUN if [ ${MSSQL} = true ]; then \
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \ && ldd lib64/libmsodbcsql-13.0.so.0.0 \
&& ./install.sh install --accept-license \ && ./install.sh install --accept-license \
&& ls -l /opt/microsoft/msodbcsql/ \ && ls -l /opt/microsoft/msodbcsql/ \
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" \ && odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
#####################################
# Install pdo_dblib
#####################################
&& docker-php-ext-install pdo \
&& docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
&& docker-php-ext-install pdo_dblib \
&& docker-php-ext-enable pdo_dblib && \
##################################### #####################################
# Install sqlsrv y pdo_sqlsrv # Install sqlsrv y pdo_sqlsrv
# extensions: # extensions:
##################################### #####################################
pecl install sqlsrv-4.0.6 && \ pecl install sqlsrv-4.0.8 && \
pecl install pdo_sqlsrv-4.0.6 && \ pecl install pdo_sqlsrv-4.0.8 && \
##################################### #####################################
# Set locales for the container # Set locales for the container
@ -283,33 +326,8 @@ RUN if [ ${MSSQL} = true ]; then \
apt-get install -y locales \ apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \ && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \ && locale-gen \
;fi && echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
#####################################
# Human Language and Character Encoding Support:
#####################################
ARG INSTALL_INTL=false
RUN if [ ${INSTALL_INTL} = true ]; then \
# Install intl and requirements
apt-get -y update \
&& 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 -y update \
&& apt-get install -y \
poppler-utils \
ghostscript \
;fi ;fi
# #
@ -318,7 +336,7 @@ RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# #
ADD ./laravel.ini /usr/local/etc/php/conf.d ADD ./laravel.ini /usr/local/etc/php/conf.d/
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/ ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/* #RUN rm -r /var/lib/apt/lists/*

View File

@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ARG INSTALL_SOAP=false ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \ RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the soap extension # Install the soap extension
apt-get -y update && \ apt-get update -yqq && \
apt-get -y install libxml2-dev php-soap && \ apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \ docker-php-ext-install soap \
;fi ;fi
@ -89,6 +89,17 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
&& docker-php-ext-enable redis \ && docker-php-ext-enable redis \
;fi ;fi
#####################################
# Swoole EXTENSION FOR PHP 7
#####################################
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
;fi
##################################### #####################################
# MongoDB: # MongoDB:
##################################### #####################################
@ -156,13 +167,19 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
# PHP Aerospike: # PHP Aerospike:
##################################### #####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging # Copy aerospike configration for remote debugging
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
# Fix dependencies for PHPUnit within aerospike extension
apt-get update -yqq && \
apt-get -y install sudo wget && \
# Install the php aerospike extension # Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
&& mkdir -p aerospike-client-php \ && mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \ && ( \
@ -172,7 +189,10 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
&& make install \ && make install \
) \ ) \
&& rm /tmp/aerospike-client-php.tar.gz \ && rm /tmp/aerospike-client-php.tar.gz \
&& docker-php-ext-enable aerospike \ ;fi
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
rm /usr/local/etc/php/conf.d/aerospike.ini \
;fi ;fi
##################################### #####################################
@ -202,7 +222,7 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \
ARG INSTALL_TOKENIZER=false ARG INSTALL_TOKENIZER=false
RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
docker-php-ext-install tokenizer \ docker-php-ext-install tokenizer \
;fi ;fi
##################################### #####################################
@ -212,6 +232,7 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
ARG INSTALL_INTL=false ARG INSTALL_INTL=false
RUN if [ ${INSTALL_INTL} = true ]; then \ RUN if [ ${INSTALL_INTL} = true ]; then \
# Install intl and requirements # Install intl and requirements
apt-get update -yqq && \
apt-get install -y zlib1g-dev libicu-dev g++ && \ apt-get install -y zlib1g-dev libicu-dev g++ && \
docker-php-ext-configure intl && \ docker-php-ext-configure intl && \
docker-php-ext-install intl \ docker-php-ext-install intl \
@ -225,12 +246,99 @@ ARG INSTALL_GHOSTSCRIPT=false
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \ RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
# Install the ghostscript extension # Install the ghostscript extension
# for PDF editing # for PDF editing
apt-get -y update \ apt-get update -yqq \
&& apt-get install -y \ && apt-get install -y \
poppler-utils \ poppler-utils \
ghostscript \ ghostscript \
;fi ;fi
#####################################
# LDAP:
#####################################
ARG INSTALL_LDAP=false
RUN if [ ${INSTALL_LDAP} = true ]; then \
apt-get update -yqq && \
apt-get install -y libldap2-dev && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
docker-php-ext-install ldap \
;fi
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# Install Depenencies:
#####################################
apt-get update -yqq && \
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
#####################################
# The following steps were taken from
# Microsoft's github account:
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
#####################################
# Add PHP 7 repository
# for Debian jessie
# And System upgrade
echo "deb http://packages.dotdeb.org jessie all" \
| tee /etc/apt/sources.list.d/dotdeb.list \
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
| apt-key add - \
&& apt-get update -yqq \
&& apt-get upgrade -qq && \
# Install UnixODBC
# Compile odbc_config as it is not part of unixodbc package
apt-get update -yqq && \
apt-get install -y whiptail \
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
&& cd unixodbc-*/ \
&& ./configure && make && make install \
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
# Fake uname for install.sh
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
| tee /usr/local/bin/uname \
&& chmod +x /usr/local/bin/uname && \
# Microsoft ODBC Driver 13 for Linux
# Note: There's a copy of this tar on my hubiC
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
&& cd msodbcsql-*/ \
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
&& ./install.sh install --accept-license \
&& ls -l /opt/microsoft/msodbcsql/ \
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
#####################################
# Install sqlsrv y pdo_sqlsrv
# extensions:
#####################################
pecl install sqlsrv-4.0.8 && \
pecl install pdo_sqlsrv-4.0.8 && \
#####################################
# Set locales for the container
#####################################
apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -1,11 +1,21 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#### halt script on error
set -e
echo '##### Print docker version'
docker --version
echo '##### Print environment'
env | sort
#### Build the Docker Images #### Build the Docker Images
if [ -n "${PHP_VERSION}" ]; then if [ -n "${PHP_VERSION}" ]; then
cp env-example .env 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/=false/=true/g' .env
cat .env cat .env
docker-compose build docker-compose build ${BUILD_SERVICE}
docker images docker images
fi fi
@ -20,7 +30,9 @@ if [ -n "${HUGO_VERSION}" ]; then
mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo
# Remove existing docs # Remove existing docs
rm -r ./docs if [ -d "./docs" ]; then
rm -r ./docs
fi
# Build docs # Build docs
cd DOCUMENTATION cd DOCUMENTATION

View File

@ -12,7 +12,7 @@
# Note: Base Image name format {image-tag}-{php-version} # Note: Base Image name format {image-tag}-{php-version}
# #
FROM laradock/workspace:1.7-56 FROM laradock/workspace:1.8-56
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me> MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
@ -46,9 +46,13 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
# Add a non-root user to prevent files being created with root permissions on host machine. # Add a non-root user to prevent files being created with root permissions on host machine.
ARG PUID=1000 ARG PUID=1000
ARG PGID=1000 ARG PGID=1000
RUN groupadd -g $PGID laradock && \
useradd -u $PUID -g laradock -m laradock
ENV PUID ${PUID}
ENV PGID ${PGID}
RUN groupadd -g ${PGID} laradock && \
useradd -u ${PUID} -g laradock -m laradock && \
apt-get update -yqq
##################################### #####################################
# SOAP: # SOAP:
@ -60,10 +64,9 @@ ENV INSTALL_SOAP ${INSTALL_SOAP}
RUN if [ ${INSTALL_SOAP} = true ]; then \ RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the PHP SOAP extension # Install the PHP SOAP extension
apt-get -y update && \
add-apt-repository -y ppa:ondrej/php && \ add-apt-repository -y ppa:ondrej/php && \
apt-get -y install libxml2-dev php5.6-soap && \ apt-get update -yqq && \
echo "extension=soap.so" >> /etc/php/5.6/cli/conf.d/40-soap.ini \ apt-get -y install libxml2-dev php5.6-soap \
;fi ;fi
##################################### #####################################
@ -129,9 +132,8 @@ RUN echo "" >> ~/.bashrc && \
ARG INSTALL_XDEBUG=false ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands # Load the xdebug extension only with phpunit commands
apt-get update && \
apt-get install -y --force-yes php5.6-xdebug && \ apt-get install -y --force-yes php5.6-xdebug && \
sed -i 's/^/;/g' /etc/php/5.6/cli/conf.d/20-xdebug.ini && \ sed -i 's/^;//g' /etc/php/5.6/cli/conf.d/20-xdebug.ini && \
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
;fi ;fi
# ADD for REMOTE debugging # ADD for REMOTE debugging
@ -151,7 +153,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \ curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \ echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \ apt-get update -yqq && \
apt-get install blackfire-agent \ apt-get install blackfire-agent \
;fi ;fi
@ -276,15 +278,15 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
##################################### #####################################
USER root USER root
ARG INSTALL_AEROSPIKE_EXTENSION=true ARG INSTALL_AEROSPIKE=true
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging # Copy aerospike configration for remote debugging
COPY ./aerospike.ini /etc/php/5.6/cli/conf.d/aerospike.ini COPY ./aerospike.ini /etc/php/5.6/cli/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
# Install the php aerospike extension # Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
&& mkdir -p aerospike-client-php \ && mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \ && ( \
@ -296,27 +298,10 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
&& rm /tmp/aerospike-client-php.tar.gz \ && rm /tmp/aerospike-client-php.tar.gz \
;fi ;fi
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \ RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
rm /etc/php/5.6/cli/conf.d/aerospike.ini \ rm /etc/php/5.6/cli/conf.d/aerospike.ini \
;fi ;fi
#####################################
# PHP V8JS:
#####################################
USER root
ARG INSTALL_V8JS_EXTENSION=false
ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION}
RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \
# Install the php V8JS extension
add-apt-repository -y ppa:pinepain/libv8-5.4 \
&& apt-get update \
&& apt-get install -y php-dev php-pear libv8-5.4 \
&& pecl install v8js \
&& echo "extension=v8js.so" >> /etc/php/5.6/cli/php.ini \
;fi
##################################### #####################################
# Non-root user : PHPUnit path # Non-root user : PHPUnit path
##################################### #####################################
@ -372,7 +357,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
# Preparation # Preparation
apt-get update && \
apt-get upgrade -y && \ apt-get upgrade -y && \
apt-get install -y build-essential make cmake scons curl git \ apt-get install -y build-essential make cmake scons curl git \
ruby autoconf automake autoconf-archive \ ruby autoconf automake autoconf-archive \
@ -381,7 +365,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
libexpat-dev libncurses-dev && \ libexpat-dev libncurses-dev && \
# Install the Linuxbrew # Install the Linuxbrew
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \ git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
echo "" >> ~/.bashrc && \ echo "" >> ~/.bashrc && \
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \ echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \

View File

@ -12,7 +12,7 @@
# Note: Base Image name format {image-tag}-{php-version} # Note: Base Image name format {image-tag}-{php-version}
# #
FROM laradock/workspace:1.7-70 FROM laradock/workspace:1.8-70
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me> MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
@ -46,9 +46,13 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
# Add a non-root user to prevent files being created with root permissions on host machine. # Add a non-root user to prevent files being created with root permissions on host machine.
ARG PUID=1000 ARG PUID=1000
ARG PGID=1000 ARG PGID=1000
RUN groupadd -g $PGID laradock && \
useradd -u $PUID -g laradock -m laradock
ENV PUID ${PUID}
ENV PGID ${PGID}
RUN groupadd -g ${PGID} laradock && \
useradd -u ${PUID} -g laradock -m laradock && \
apt-get update -yqq
##################################### #####################################
# SOAP: # SOAP:
@ -60,8 +64,8 @@ ENV INSTALL_SOAP ${INSTALL_SOAP}
RUN if [ ${INSTALL_SOAP} = true ]; then \ RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the PHP SOAP extension # Install the PHP SOAP extension
apt-get -y update && \
add-apt-repository -y ppa:ondrej/php && \ add-apt-repository -y ppa:ondrej/php && \
apt-get update -yqq && \
apt-get -y install libxml2-dev php7.0-soap \ apt-get -y install libxml2-dev php7.0-soap \
;fi ;fi
@ -128,9 +132,8 @@ RUN echo "" >> ~/.bashrc && \
ARG INSTALL_XDEBUG=false ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands # Load the xdebug extension only with phpunit commands
apt-get update && \
apt-get install -y --force-yes php7.0-xdebug && \ apt-get install -y --force-yes php7.0-xdebug && \
sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini && \ sed -i 's/^;//g' /etc/php/7.0/cli/conf.d/20-xdebug.ini && \
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
;fi ;fi
# ADD for REMOTE debugging # ADD for REMOTE debugging
@ -150,7 +153,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \ curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \ echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \ apt-get update -yqq && \
apt-get install blackfire-agent \ apt-get install blackfire-agent \
;fi ;fi
@ -275,15 +278,15 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
##################################### #####################################
USER root USER root
ARG INSTALL_AEROSPIKE_EXTENSION=true ARG INSTALL_AEROSPIKE=true
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging # Copy aerospike configration for remote debugging
COPY ./aerospike.ini /etc/php/7.0/cli/conf.d/aerospike.ini COPY ./aerospike.ini /etc/php/7.0/cli/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
# Install the php aerospike extension # Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
&& mkdir -p aerospike-client-php \ && mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \ && ( \
@ -295,7 +298,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
&& rm /tmp/aerospike-client-php.tar.gz \ && rm /tmp/aerospike-client-php.tar.gz \
;fi ;fi
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \ RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
rm /etc/php/7.0/cli/conf.d/aerospike.ini \ rm /etc/php/7.0/cli/conf.d/aerospike.ini \
;fi ;fi
@ -304,14 +307,14 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
##################################### #####################################
USER root USER root
ARG INSTALL_V8JS_EXTENSION=false ARG INSTALL_V8JS=false
ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION} ENV INSTALL_V8JS ${INSTALL_V8JS}
RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \ RUN if [ ${INSTALL_V8JS} = true ]; then \
# Install the php V8JS extension # Install the php V8JS extension
add-apt-repository -y ppa:pinepain/libv8-5.4 \ add-apt-repository -y ppa:pinepain/libv8-5.4 \
&& apt-get update \ && apt-get update -yqq \
&& apt-get install -y php-dev php-pear libv8-5.4 \ && apt-get install -y php7.0-xml php7.0-dev php-pear libv8-5.4 \
&& pecl install v8js \ && pecl install v8js \
&& echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \ && echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \
;fi ;fi
@ -371,7 +374,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
# Preparation # Preparation
apt-get update && \
apt-get upgrade -y && \ apt-get upgrade -y && \
apt-get install -y build-essential make cmake scons curl git \ apt-get install -y build-essential make cmake scons curl git \
ruby autoconf automake autoconf-archive \ ruby autoconf automake autoconf-archive \
@ -380,7 +382,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
libexpat-dev libncurses-dev && \ libexpat-dev libncurses-dev && \
# Install the Linuxbrew # Install the Linuxbrew
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \ git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \
echo "" >> ~/.bashrc && \ echo "" >> ~/.bashrc && \
echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \ echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \
@ -393,6 +395,83 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \ echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
;fi ;fi
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=true
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# Install Depenencies:
#####################################
cd / && \
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
#####################################
# The following steps were taken from
# Microsoft's github account:
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
#####################################
# Add PHP 7 repository
# for Debian jessie
# And System upgrade
cd / && \
echo "deb http://packages.dotdeb.org jessie all" \
| tee /etc/apt/sources.list.d/dotdeb.list \
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
| apt-key add - \
&& apt-get update -yqq \
&& apt-get upgrade -qq && \
# Install UnixODBC
# Compile odbc_config as it is not part of unixodbc package
cd / && \
apt-get install -y whiptail \
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
&& cd unixodbc-*/ \
&& ./configure && make && make install \
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
# Fake uname for install.sh
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
| tee /usr/local/bin/uname \
&& chmod +x /usr/local/bin/uname && \
# Microsoft ODBC Driver 13 for Linux
# Note: There's a copy of this tar on my hubiC
cd / && \
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
&& cd msodbcsql-*/ \
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
&& ./install.sh install --accept-license \
&& ls -l /opt/microsoft/msodbcsql/ \
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
#####################################
# Install sqlsrv y pdo_sqlsrv
# extensions:
#####################################
pecl install sqlsrv-4.0.8 && \
pecl install pdo_sqlsrv-4.0.8 && \
#####################################
# Set locales for the container
#####################################
apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& echo "extension=sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-sqlsrv.ini \
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-pdo_sqlsrv.ini \
;fi
##################################### #####################################
# Minio: # Minio:
##################################### #####################################
@ -429,8 +508,6 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
;fi ;fi
USER laradock
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -12,7 +12,7 @@
# Note: Base Image name format {image-tag}-{php-version} # Note: Base Image name format {image-tag}-{php-version}
# #
FROM laradock/workspace:1.7-71 FROM laradock/workspace:1.8-71
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me> MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
@ -46,8 +46,28 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
# Add a non-root user to prevent files being created with root permissions on host machine. # Add a non-root user to prevent files being created with root permissions on host machine.
ARG PUID=1000 ARG PUID=1000
ARG PGID=1000 ARG PGID=1000
RUN groupadd -g $PGID laradock && \
useradd -u $PUID -g laradock -m laradock ENV PUID ${PUID}
ENV PGID ${PGID}
RUN groupadd -g ${PGID} laradock && \
useradd -u ${PUID} -g laradock -m laradock && \
apt-get update -yqq
#####################################
# SOAP:
#####################################
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
##################################### #####################################
# Set Timezone # Set Timezone
@ -81,7 +101,25 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
##################################### #####################################
USER root USER root
COPY ./crontab /var/spool/cron/crontabs COPY ./crontab /etc/cron.d
RUN chmod -R 644 /etc/cron.d
#####################################
# User Aliases
#####################################
USER laradock
COPY ./aliases.sh /home/laradock/aliases.sh
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
USER root
RUN echo "" >> ~/.bashrc && \
echo "# Load Custom Aliases" >> ~/.bashrc && \
echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \
echo "" >> ~/.bashrc
##################################### #####################################
# xDebug: # xDebug:
@ -90,9 +128,8 @@ COPY ./crontab /var/spool/cron/crontabs
ARG INSTALL_XDEBUG=false ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands # Load the xdebug extension only with phpunit commands
apt-get update && \
apt-get install -y --force-yes php-xdebug && \ apt-get install -y --force-yes php-xdebug && \
sed -i 's/^/;/g' /etc/php/7.1/cli/conf.d/20-xdebug.ini && \ sed -i 's/^;//g' /etc/php/7.1/cli/conf.d/20-xdebug.ini && \
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
;fi ;fi
# ADD for REMOTE debugging # ADD for REMOTE debugging
@ -112,7 +149,7 @@ ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \ curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \ echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \ apt-get update -yqq && \
apt-get install blackfire-agent \ apt-get install blackfire-agent \
;fi ;fi
@ -176,7 +213,7 @@ ENV INSTALL_NODE ${INSTALL_NODE}
ENV NVM_DIR /home/laradock/.nvm ENV NVM_DIR /home/laradock/.nvm
RUN if [ ${INSTALL_NODE} = true ]; then \ RUN if [ ${INSTALL_NODE} = true ]; then \
# Install nvm (A Node Version Manager) # Install nvm (A Node Version Manager)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.6/install.sh | bash && \ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash && \
. $NVM_DIR/nvm.sh && \ . $NVM_DIR/nvm.sh && \
nvm install ${NODE_VERSION} && \ nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \ nvm use ${NODE_VERSION} && \
@ -209,10 +246,16 @@ USER laradock
ARG INSTALL_YARN=false ARG INSTALL_YARN=false
ENV INSTALL_YARN ${INSTALL_YARN} ENV INSTALL_YARN ${INSTALL_YARN}
ARG YARN_VERSION=latest
ENV YARN_VERSION ${YARN_VERSION}
RUN if [ ${INSTALL_YARN} = true ]; then \ RUN if [ ${INSTALL_YARN} = true ]; then \
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
curl -o- -L https://yarnpkg.com/install.sh | bash && \ if [ ${YARN_VERSION} = "latest" ]; then \
curl -o- -L https://yarnpkg.com/install.sh | bash; \
else \
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \
fi && \
echo "" >> ~/.bashrc && \ echo "" >> ~/.bashrc && \
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \ echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
;fi ;fi
@ -231,15 +274,19 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
##################################### #####################################
USER root USER root
ARG INSTALL_AEROSPIKE_EXTENSION=true ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION} ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging # Copy aerospike configration for remote debugging
COPY ./aerospike.ini /etc/php/7.1/cli/conf.d/aerospike.ini COPY ./aerospike.ini /etc/php/7.1/cli/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
# Fix dependencies for PHPUnit within aerospike extension
apt-get update -yqq && \
apt-get -y install sudo wget && \
# Install the php aerospike extension # Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/3.4.14.tar.gz" \
&& mkdir -p aerospike-client-php \ && mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \ && ( \
@ -251,10 +298,27 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
&& rm /tmp/aerospike-client-php.tar.gz \ && rm /tmp/aerospike-client-php.tar.gz \
;fi ;fi
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \ RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
rm /etc/php/7.1/cli/conf.d/aerospike.ini \ rm /etc/php/7.1/cli/conf.d/aerospike.ini \
;fi ;fi
#####################################
# 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-5.4 \
&& 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.1/cli/php.ini \
;fi
##################################### #####################################
# Non-root user : PHPUnit path # Non-root user : PHPUnit path
##################################### #####################################
@ -265,6 +329,189 @@ USER laradock
RUN echo "" >> ~/.bashrc && \ RUN echo "" >> ~/.bashrc && \
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
#####################################
# Laravel Artisan Alias
#####################################
USER root
RUN echo "" >> ~/.bashrc && \
echo 'alias art="php artisan"' >> ~/.bashrc
#####################################
# Laravel Envoy:
#####################################
USER laradock
ARG INSTALL_LARAVEL_ENVOY=true
ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY}
RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
# Install the Laravel Envoy
composer global require "laravel/envoy=~1.0" \
;fi
#####################################
# 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
#####################################
# 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 if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# Install Depenencies:
#####################################
cd / && \
apt-get update -yqq && \
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
#####################################
# The following steps were taken from
# Microsoft's github account:
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
#####################################
# Add PHP 7 repository
# for Debian jessie
# And System upgrade
cd / && \
echo "deb http://packages.dotdeb.org jessie all" \
| tee /etc/apt/sources.list.d/dotdeb.list \
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
| apt-key add - \
&& apt-get update -yqq \
&& apt-get upgrade -qq && \
# Install UnixODBC
# Compile odbc_config as it is not part of unixodbc package
cd / && \
apt-get update -yqq && \
apt-get install -y whiptail \
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
&& cd unixodbc-*/ \
&& ./configure && make && make install \
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
# Fake uname for install.sh
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
| tee /usr/local/bin/uname \
&& chmod +x /usr/local/bin/uname && \
# Microsoft ODBC Driver 13 for Linux
# Note: There's a copy of this tar on my hubiC
cd / && \
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
&& cd msodbcsql-*/ \
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
&& ./install.sh install --accept-license \
&& ls -l /opt/microsoft/msodbcsql/ \
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
#####################################
# Install sqlsrv y pdo_sqlsrv
# extensions:
#####################################
pecl install sqlsrv-4.0.8 && \
pecl install pdo_sqlsrv-4.0.8 && \
#####################################
# Set locales for the container
#####################################
apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& echo "extension=sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-sqlsrv.ini \
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-pdo_sqlsrv.ini \
;fi
#####################################
# Minio:
#####################################
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
#####################################
# 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
USER laradock
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch