Compare commits

..

84 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
956b9209bf fixing ci build problem 2017-04-30 21:52:22 +08:00
74ba0ef0a8 Added support for MS SQL server driver for PHP 7.0 2017-04-27 13:58:27 -04:00
20 changed files with 840 additions and 386 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/).
@ -1239,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`
@ -1254,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

@ -4,32 +4,34 @@ type: index
weight: 2 weight: 2
--- ---
# Requirements ## Requirements
- [Git](https://git-scm.com/downloads) - [Git](https://git-scm.com/downloads)
- [Docker](https://www.docker.com/products/docker/) `>= 1.12` - [Docker](https://www.docker.com/products/docker/) `>= 1.12`
# Installation
## Installation
Choose the setup the best suits your needs. Choose the setup the best suits your needs.
- [A) Setup for Single Project](#A) - [A) Setup for Single Project](#A)
- [A.1) Already have a PHP project](#A1)
- [A.1) Already have a PHP project](#A1) - [A.2) Don't have a PHP project yet](#A2)
- [A.2) Don't have a PHP project yet](#A2)
- [B) Setup for Multiple Projects](#B) - [B) Setup for Multiple Projects](#B)
[]()
## A) Setup for Single Project
<a name="A"></a>
### A) Setup for Single Project
> (Follow these steps if you want a separate Docker environment for each project) > (Follow these steps if you want a separate Docker environment for each project)
[]()
## A.1) Already have a PHP project: <a name="A1"></a>
### A.1) Already have a PHP project:
1 - Clone laradock on your project root directory: 1 - Clone laradock on your project root directory:
@ -37,9 +39,10 @@ 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
``` ```
Note: If you are not using Git yet for your project, you can use `git clone` instead of `git submodule`. Note: 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)*
_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)_
Your folder structure should look like this: Your folder structure should look like this:
@ -50,13 +53,12 @@ Your folder structure should look like this:
+ laradock-b + laradock-b
``` ```
_(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per 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.**
[]() <a name="A2"></a>
### A.2) Don't have a PHP project yet:
## A.2) Don't have a PHP project yet:
1 - Clone this repository anywhere on your machine: 1 - Clone this repository anywhere on your machine:
@ -89,13 +91,12 @@ 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.**
[]()
## B) Setup for Multiple Projects:
<a name="B"></a>
### B) Setup for Multiple Projects:
> (Follow these steps if you want a single Docker environment for all your project) > (Follow these steps if you want a single Docker environment for all your project)
1 - Clone this repository anywhere on your machine (similar to [Steps A.2\. from above](#A2)): 1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
```bash ```bash
git clone https://github.com/laradock/laradock.git git clone https://github.com/laradock/laradock.git
@ -126,20 +127,29 @@ You can rename the config files, project folders and domains as you like, just m
> **Now jump to the [Usage](#Usage) section.** > **Now jump to the [Usage](#Usage) section.**
[]()
# Usage
<a name="Usage"></a>
## Usage
**Read Before starting:** **Read Before starting:**
If you are using **Docker Toolbox** (VM), do one of the following: If you are using **Docker Toolbox** (VM), do one of the following:
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock) - Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
- Use Laradock v3.*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. _(outdated)_ - Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
<br> <br>
> **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. 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.
<br> <br>
@ -151,6 +161,7 @@ cp env-example .env
You can edit the `.env` file to chose which software's you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables are been used. You can edit the `.env` file to chose which software's you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables are been used.
2 - Build the enviroment and run it using `docker-compose` 2 - Build the enviroment and run it using `docker-compose`
In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts: In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:
@ -161,9 +172,11 @@ docker-compose up -d nginx mysql
**Note**: The `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. If you couldn't find them running then you need specify them as follow: `docker-compose up -d nginx php-fpm mysql workspace`. **Note**: The `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. If you couldn't find them running then you need specify them as follow: `docker-compose up -d nginx php-fpm mysql workspace`.
You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images). You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images).
_(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers)._ *(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers).*
<br> <br>
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...) 3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...)
@ -172,19 +185,19 @@ _(Please note that sometimes we forget to update the docs, so check the `docker-
docker-compose exec workspace bash docker-compose exec workspace bash
``` ```
_Alternatively, for Windows PowerShell users: execute the following command to enter any running container:_ *Alternatively, for Windows PowerShell users: execute the following command to enter any running container:*
```bash ```bash
docker exec -it {workspace-container-id} bash docker exec -it {workspace-container-id} bash
``` ```
**Note:** You can add `--user=laradock` to have files created as your host's user. Example: **Note:** You can add `--user=laradock` to have files created as your host's user. Example:
```shell ```shell
docker-compose exec --user=laradock workspace bash docker-compose exec --user=laradock workspace bash
``` ```
_You can change the PUID (User id) and PGID (group id) variables from the `.env` file)_ *You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
<br> <br>
4 - Update your project configurations to use the database host 4 - Update your project configurations to use the database host
@ -195,7 +208,7 @@ Open your PHP project's `.env` file or whichever configuration file you are read
DB_HOST=mysql 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

@ -4,11 +4,14 @@ type: index
weight: 4 weight: 4
--- ---
- [Production Setup on Digital Ocean](#Digital-Ocean)
- [PHPStorm XDebug Setup](#PHPStorm-Debugging)
[]()
* [Production Setup on Digital Ocean](#Digital-Ocean)
* [PHPStorm XDebug Setup](#PHPStorm-Debugging)
<a name="Digital-Ocean"></a>
# Production Setup on Digital Ocean # Production Setup on Digital Ocean
## Install Docker ## Install Docker
@ -104,7 +107,7 @@ ns3.digitalocean.com
Within DigitalOcean, you'll need to change some settings, too. Within DigitalOcean, you'll need to change some settings, too.
Visit: <https://cloud.digitalocean.com/networking/domains> Visit: https://cloud.digitalocean.com/networking/domains
Add your domain name and choose the server IP you'd provision earlier. Add your domain name and choose the server IP you'd provision earlier.
@ -145,7 +148,7 @@ $root@server:~/laravel/laradock/nginx# docker-compose build nginx
$root@server:~/laravel/laradock/nginx# docker-compose up -d nginx mysql $root@server:~/laravel/laradock/nginx# docker-compose up -d nginx mysql
``` ```
**View Your Site with HTTP ONLY (<http://yourdomain.com>)** **View Your Site with HTTP ONLY (http://yourdomain.com)**
## Run Site on SSL with Let's Encrypt Certificate ## Run Site on SSL with Let's Encrypt Certificate
@ -165,7 +168,7 @@ Remove 0.0.0.0:80
root /var/www/public root /var/www/public
``` ```
and replace with your <https://yourdomain.com> and replace with your https://yourdomain.com
``` ```
https://yourdomain.com https://yourdomain.com
@ -214,93 +217,83 @@ $root@server:~/laravel/laradock/caddy# docker-compose down
$root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy $root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
``` ```
View your Site in the Browser Securely Using HTTPS (<https://yourdomain.com>) View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)
**Note that Certificate will be Automatically Renew By Caddy** **Note that Certificate will be Automatically Renew By Caddy**
> References: >References:
>
- [https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04)
- [https://www.digitalocean.com/products/one-click-apps/docker/](https://www.digitalocean.com/products/one-click-apps/docker/)
- [https://docs.docker.com/engine/installation/linux/ubuntulinux/](https://docs.docker.com/engine/installation/linux/ubuntulinux/)
- [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
- [https://caddyserver.com/docs/automatic-https](https://caddyserver.com/docs/automatic-https)
- [https://caddyserver.com/docs/tls](https://caddyserver.com/docs/tls)
- [https://caddyserver.com/docs/caddyfile](https://caddyserver.com/docs/caddyfile)
> - <https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04>
> - <https://www.digitalocean.com/products/one-click-apps/docker/>
> - <https://docs.docker.com/engine/installation/linux/ubuntulinux/>
> - <https://docs.docker.com/compose/install/>
> - <https://caddyserver.com/docs/automatic-https>
> - <https://caddyserver.com/docs/tls>
> - <https://caddyserver.com/docs/caddyfile>
<br><br><br><br><br>
[]()
<br>
<br>
<br>
<br>
<br>
<a name="PHPStorm-Debugging"></a>
# PHPStorm XDebug Setup # PHPStorm XDebug Setup
- [Intro](#Intro) - [Intro](#Intro)
- [Installation](#Installation) - [Installation](#Installation)
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose)
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose) - [Clean House](#InstallCleanHouse)
- [Laradock Dial Tone](#InstallLaradockDialTone)
- [Clean House](#InstallCleanHouse) - [hosts](#AddToHosts)
- [Laradock Dial Tone](#InstallLaradockDialTone) - [Firewall](#FireWall)
- [hosts](#AddToHosts) - [Enable xDebug on php-fpm](#enablePhpXdebug)
- [Firewall](#FireWall) - [PHPStorm Settings](#InstallPHPStorm)
- [Enable xDebug on php-fpm](#enablePhpXdebug) - [Configs](#InstallPHPStormConfigs)
- [PHPStorm Settings](#InstallPHPStorm)
- [Configs](#InstallPHPStormConfigs)
- [Usage](#Usage) - [Usage](#Usage)
- [Laravel](#UsageLaravel)
- [Laravel](#UsageLaravel) - [Run ExampleTest](#UsagePHPStormRunExampleTest)
- [Debug ExampleTest](#UsagePHPStormDebugExampleTest)
- [Run ExampleTest](#UsagePHPStormRunExampleTest) - [Debug Web Site](#UsagePHPStormDebugSite)
- [Debug ExampleTest](#UsagePHPStormDebugExampleTest)
- [Debug Web Site](#UsagePHPStormDebugSite)
- [SSH into workspace](#SSHintoWorkspace) - [SSH into workspace](#SSHintoWorkspace)
- [KiTTY](#InstallKiTTY)
- [KiTTY](#InstallKiTTY) <a name="Intro"></a>
[]()
## Intro ## Intro
Wiring up [Laravel](https://laravel.com/), [Laradock](https://github.com/Laradock/laradock) [Laravel+Docker] and [PHPStorm](https://www.jetbrains.com/phpstorm/) to play nice together complete with remote xdebug'ing as icing on top! Although this guide is based on `PHPStorm Windows`, you should be able to adjust accordingly. This guide was written based on Docker for Windows Native. Wiring up [Laravel](https://laravel.com/), [Laradock](https://github.com/Laradock/laradock) [Laravel+Docker] and [PHPStorm](https://www.jetbrains.com/phpstorm/) to play nice together complete with remote xdebug'ing as icing on top! Although this guide is based on `PHPStorm Windows`,
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.
[]()
<a name="Installation"></a>
## Installation ## Installation
- This guide assumes the following: - This guide assumes the following:
- you have already installed and are familiar with Laravel, Laradock and PHPStorm.
- you have installed Laravel as a parent of `laradock`. This guide assumes `/c/_dk/laravel`.
- you have already installed and are familiar with Laravel, Laradock and PHPStorm. <a name="AddToHosts"></a>
- you have installed Laravel as a parent of `laradock`. This guide assumes `/c/_dk/laravel`.
[]()
## hosts ## hosts
- Add `laravel` to your hosts file located on Windows 10 at `C:\Windows\System32\drivers\etc\hosts`. It should be set to the IP of your running container. Mine is: `10.0.75.2`
- Add `laravel` to your hosts file located on Windows 10 at `C:\Windows\System32\drivers\etc\hosts`. It should be set to the IP of your running container. Mine is: `10.0.75.2` On Windows you can find it by opening Windows `Hyper-V Manager`. On Windows you can find it by opening Windows `Hyper-V Manager`.
- ![Windows Hyper-V Manager](images/photos/PHPStorm/Settings/WindowsHyperVManager.png)
- ![Windows Hyper-V Manager](images/photos/PHPStorm/Settings/WindowsHyperVManager.png)
- [Hosts File Editor](https://github.com/scottlerch/HostsFileEditor) makes it easy to change your hosts file. - [Hosts File Editor](https://github.com/scottlerch/HostsFileEditor) makes it easy to change your hosts file.
- Set `laravel` to your docker host IP. See [Example](images/photos/SimpleHostsEditor/AddHost_laravel.png).
- Set `laravel` to your docker host IP. See [Example](images/photos/SimpleHostsEditor/AddHost_laravel.png).
[]()
<a name="FireWall"></a>
## Firewall ## Firewall
Your PHPStorm will need to be able to receive a connection from PHP xdebug either your running workspace or php-fpm containers on port 9000. This means that your Windows Firewall should either enable connections from the Application PHPStorm OR the port.
Your PHPStorm will need to be able to receive a connection from PHP xdebug either your running workspace or php-fpm containers on port 9000\. This means that your Windows Firewall should either enable connections from the Application PHPStorm OR the port.
- It is important to note that if the Application PHPStorm is NOT enabled in the firewall, you will not be able to recreate a rule to override that. - It is important to note that if the Application PHPStorm is NOT enabled in the firewall, you will not be able to recreate a rule to override that.
- Also be aware that if you are installing/upgrade different versions of PHPStorm, you MAY have orphaned references to PHPStorm in your Firewall! You may decide to remove orphaned references however in either case, make sure that they are set to receive public TCP traffic. - Also be aware that if you are installing/upgrade different versions of PHPStorm, you MAY have orphaned references to PHPStorm in your Firewall! You may decide to remove orphaned references however in either case, make sure that they are set to receive public TCP traffic.
### Edit laradock/docker-compose.yml ### Edit laradock/docker-compose.yml
Set the following variables: Set the following variables:
``` ```
### Workspace Utilities Container ############### ### Workspace Utilities Container ###############
@ -321,15 +314,14 @@ Set the following variables:
args: args:
- INSTALL_XDEBUG=true - INSTALL_XDEBUG=true
... ...
``` ```
### Edit xdebug.ini files ### Edit xdebug.ini files
- `laradock/workspace/xdebug.ini` - `laradock/workspace/xdebug.ini`
- `laradock/php-fpm/xdebug.ini` - `laradock/php-fpm/xdebug.ini`
Set the following variables: Set the following variables:
``` ```
xdebug.remote_autostart=1 xdebug.remote_autostart=1
xdebug.remote_enable=1 xdebug.remote_enable=1
@ -337,19 +329,23 @@ xdebug.remote_connect_back=1
xdebug.cli_color=1 xdebug.cli_color=1
``` ```
[]()
<a name="InstallCleanHouse"></a>
### Need to clean house first? ### Need to clean house first?
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
Here are a few things I use to clean things up.
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images? Here are a few things I use to clean things up. - Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name). `docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}` - Delete all images containing `laradock`.
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
- Delete all images containing `laradock`. `docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}` **Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc. **Note:** Some may fail with: `Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images` **Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc.
**Note:** Some may fail with:
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
- I added this to my `.bashrc` to remove orphaned images. - I added this to my `.bashrc` to remove orphaned images.
```
```
dclean() { dclean() {
processes=`docker ps -q -f status=exited` processes=`docker ps -q -f status=exited`
if [ -n "$processes" ]; thend if [ -n "$processes" ]; thend
@ -361,35 +357,33 @@ Make sure you are starting with a clean state. For example, do you have other La
docker rmi $images docker rmi $images
fi fi
} }
``` ```
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful: - If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
```
# remove laravel* containers
# remove laravel_* images
dcleanlaradockfunction()
{
echo 'Removing ALL containers associated with laradock'
docker ps -a | awk '{ print $1,$2 }' | grep laradock | awk '{print $1}' | xargs -I {} docker rm {}
``` # remove ALL images associated with laradock_
# remove laravel* containers # does NOT delete laradock/* which are hub images
# remove laravel_* images echo 'Removing ALL images associated with laradock_'
dcleanlaradockfunction() docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}
{
echo 'Removing ALL containers associated with laradock'
docker ps -a | awk '{ print $1,$2 }' | grep laradock | awk '{print $1}' | xargs -I {} docker rm {}
# remove ALL images associated with laradock_ echo 'Listing all laradock docker hub images...'
# does NOT delete laradock/* which are hub images docker images | grep laradock
echo 'Removing ALL images associated with laradock_'
docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}
echo 'Listing all laradock docker hub images...' echo 'dcleanlaradock completed'
docker images | grep laradock }
# associate the above function with an alias
echo 'dcleanlaradock completed' # so can recall/lookup by typing 'alias'
} alias dcleanlaradock=dcleanlaradockfunction
# associate the above function with an alias ```
# so can recall/lookup by typing 'alias'
alias dcleanlaradock=dcleanlaradockfunction
```
[]()
<a name="InstallLaradockDialTone"></a>
## Let's get a dial-tone with Laravel ## Let's get a dial-tone with Laravel
``` ```
@ -408,14 +402,14 @@ laradock_php-fpm_1 php-fpm Up 9000/tcp
laradock_volumes_data_1 true Exit 0 laradock_volumes_data_1 true Exit 0
laradock_volumes_source_1 true Exit 0 laradock_volumes_source_1 true Exit 0
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
``` ```
[]() <a name="enablePhpXdebug"></a>
## Enable xDebug on php-fpm ## Enable xDebug on php-fpm
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status` You should see something like the following: You should see something like the following:
``` ```
xDebug status xDebug status
laradock_php-fpm_1 laradock_php-fpm_1
@ -424,150 +418,129 @@ Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
``` ```
Other commands include `.php-fpm/xdebug start | stop`. Other commands include `.php-fpm/xdebug start | stop`.
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when `php-fpm` is started and listening for debug info on port 9000. If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
`php-fpm` is started and listening for debug info on port 9000.
[]()
<a name="InstallPHPStormConfigs"></a>
## PHPStorm Settings ## PHPStorm Settings
- Here are some settings that are known to work: - Here are some settings that are known to work:
- `Settings/BuildDeploymentConnection`
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)
- `Settings/BuildDeploymentConnection` - `Settings/BuildDeploymentConnectionMappings`
- ![Settings/BuildDeploymentConnectionMappings](/images/photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png)
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png) - `Settings/BuildDeploymentDebugger`
- ![Settings/BuildDeploymentDebugger](/images/photos/PHPStorm/Settings/BuildDeploymentDebugger.png)
- `Settings/BuildDeploymentConnectionMappings` - `Settings/EditRunConfigurationRemoteWebDebug`
- ![Settings/EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
- ![Settings/BuildDeploymentConnectionMappings](/images/photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png) - `Settings/EditRunConfigurationRemoteExampleTestDebug`
- ![Settings/EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
- `Settings/BuildDeploymentDebugger` - `Settings/LangsPHPDebug`
- ![Settings/LangsPHPDebug](/images/photos/PHPStorm/Settings/LangsPHPDebug.png)
- ![Settings/BuildDeploymentDebugger](/images/photos/PHPStorm/Settings/BuildDeploymentDebugger.png) - `Settings/LangsPHPInterpreters`
- ![Settings/LangsPHPInterpreters](/images/photos/PHPStorm/Settings/LangsPHPInterpreters.png)
- `Settings/EditRunConfigurationRemoteWebDebug` - `Settings/LangsPHPPHPUnit`
- ![Settings/LangsPHPPHPUnit](/images/photos/PHPStorm/Settings/LangsPHPPHPUnit.png)
- ![Settings/EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png) - `Settings/LangsPHPServers`
- ![Settings/LangsPHPServers](/images/photos/PHPStorm/Settings/LangsPHPServers.png)
- `Settings/EditRunConfigurationRemoteExampleTestDebug` - `RemoteHost`
To switch on this view, go to: `Menu/Tools/Deployment/Browse Remote Host`.
- ![RemoteHost](/images/photos/PHPStorm/RemoteHost.png)
- ![Settings/EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png) - `RemoteWebDebug`
- ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
- `Settings/LangsPHPDebug` - `EditRunConfigurationRemoteWebDebug`
Go to: `Menu/Run/Edit Configurations`.
- ![EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
- ![Settings/LangsPHPDebug](/images/photos/PHPStorm/Settings/LangsPHPDebug.png) - `EditRunConfigurationRemoteExampleTestDebug`
Go to: `Menu/Run/Edit Configurations`.
- ![EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
- `Settings/LangsPHPInterpreters` - `WindowsFirewallAllowedApps`
Go to: `Control Panel\All Control Panel Items\Windows Firewall\Allowed apps`.
- ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png)
- ![Settings/LangsPHPInterpreters](/images/photos/PHPStorm/Settings/LangsPHPInterpreters.png) - `hosts`
Edit: `C:\Windows\System32\drivers\etc\hosts`.
- ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/hosts.png)
- `Settings/LangsPHPPHPUnit` - [Enable xDebug on php-fpm](#enablePhpXdebug)
- ![Settings/LangsPHPPHPUnit](/images/photos/PHPStorm/Settings/LangsPHPPHPUnit.png)
- `Settings/LangsPHPServers`
- ![Settings/LangsPHPServers](/images/photos/PHPStorm/Settings/LangsPHPServers.png)
- `RemoteHost` To switch on this view, go to: `Menu/Tools/Deployment/Browse Remote Host`.
- ![RemoteHost](/images/photos/PHPStorm/RemoteHost.png)
- `RemoteWebDebug`
- ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
- `EditRunConfigurationRemoteWebDebug` Go to: `Menu/Run/Edit Configurations`.
- ![EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
- `EditRunConfigurationRemoteExampleTestDebug` Go to: `Menu/Run/Edit Configurations`.
- ![EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
- `WindowsFirewallAllowedApps` Go to: `Control Panel\All Control Panel Items\Windows Firewall\Allowed apps`.
- ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png)
- `hosts` Edit: `C:\Windows\System32\drivers\etc\hosts`.
- ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/hosts.png)
- [Enable xDebug on php-fpm](#enablePhpXdebug)
[]()
<a name="Usage"></a>
## Usage ## Usage
[]() <a name="UsagePHPStormRunExampleTest"></a>
### Run ExampleTest ### Run ExampleTest
- right-click on `tests/ExampleTest.php` - right-click on `tests/ExampleTest.php`
- Select: `Run 'ExampleTest.php'` or `Ctrl+Shift+F10`.
- Should pass!! You just ran a remote test via SSH!
- Select: `Run 'ExampleTest.php'` or `Ctrl+Shift+F10`. <a name="UsagePHPStormDebugExampleTest"></a>
- Should pass!! You just ran a remote test via SSH!
[]()
### Debug ExampleTest ### Debug ExampleTest
- Open to edit: `tests/ExampleTest.php` - Open to edit: `tests/ExampleTest.php`
- Add a BreakPoint on line 16: `$this->visit('/')` - Add a BreakPoint on line 16: `$this->visit('/')`
- right-click on `tests/ExampleTest.php` - right-click on `tests/ExampleTest.php`
- Select: `Debug 'ExampleTest.php'`.
- 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)
- Select: `Debug 'ExampleTest.php'`.
- 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)
[]()
<a name="UsagePHPStormDebugSite"></a>
### Debug WebSite ### Debug WebSite
- In case xDebug is disabled, from the `laradock` folder run:
- In case xDebug is disabled, from the `laradock` folder run: `.php-fpm/xdebug start`. `.php-fpm/xdebug start`.
- To switch xdebug off, run:
- To switch xdebug off, run: `.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!
- ![Remote Debugging Success](/images/photos/PHPStorm/RemoteDebuggingSuccess.png)
- 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)
[]()
<a name="SSHintoWorkspace"></a>
## Let's shell into workspace ## Let's shell into workspace
Assuming that you are in laradock folder, type:
Assuming that you are in laradock folder, type: `ssh -i workspace/insecure_id_rsa -p2222 root@laravel` **Cha Ching!!!!** `ssh -i workspace/insecure_id_rsa -p2222 root@laravel`
**Cha Ching!!!!**
- `workspace/insecure_id_rsa.ppk` may become corrupted. In which case: - `workspace/insecure_id_rsa.ppk` may become corrupted. In which case:
- fire up `puttygen`
- import `workspace/insecure_id_rsa`
- save private key to `workspace/insecure_id_rsa.ppk`
- fire up `puttygen` <a name="InstallKiTTY"></a>
- import `workspace/insecure_id_rsa`
- save private key to `workspace/insecure_id_rsa.ppk`
[]()
### KiTTY ### KiTTY
[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)
- ![Terminal](/images/photos/KiTTY/Terminal.png)
- ![Window](/images/photos/KiTTY/Window.png)
- ![WindowAppearance](/images/photos/KiTTY/WindowAppearance.png)
- ![Connection](/images/photos/KiTTY/Connection.png)
- ![ConnectionData](/images/photos/KiTTY/ConnectionData.png)
- ![ConnectionSSH](/images/photos/KiTTY/ConnectionSSH.png)
- ![ConnectionSSHAuth](/images/photos/KiTTY/ConnectionSSHAuth.png)
- ![TerminalShell](/images/photos/KiTTY/TerminalShell.png)
- ![Session](/images/photos/KiTTY/Session.png)
- ![Terminal](/images/photos/KiTTY/Terminal.png)
- ![Window](/images/photos/KiTTY/Window.png)
- ![WindowAppearance](/images/photos/KiTTY/WindowAppearance.png)
- ![Connection](/images/photos/KiTTY/Connection.png)
- ![ConnectionData](/images/photos/KiTTY/ConnectionData.png)
- ![ConnectionSSH](/images/photos/KiTTY/ConnectionSSH.png)
- ![ConnectionSSHAuth](/images/photos/KiTTY/ConnectionSSHAuth.png)
- ![TerminalShell](/images/photos/KiTTY/TerminalShell.png)

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_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_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 ##############################################################################################################
@ -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 .................................

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

@ -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,7 +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 -y update && \ apt-get update -yqq && \
apt-get install -y zlib1g-dev libicu-dev g++ && \ apt-get install -y zlib1g-dev libicu-dev g++ && \
docker-php-ext-configure intl && \ docker-php-ext-configure intl && \
docker-php-ext-install intl \ docker-php-ext-install intl \
@ -226,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

@ -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 php5.6-soap \ apt-get -y install libxml2-dev php5.6-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 php5.6-xdebug && \ apt-get install -y --force-yes php5.6-xdebug && \
sed -i 's/^/;/g' /etc/php/5.6/cli/conf.d/20-xdebug.ini && \ sed -i 's/^;//g' /etc/php/5.6/cli/conf.d/20-xdebug.ini && \
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
;fi ;fi
# ADD for REMOTE debugging # ADD for REMOTE debugging
@ -150,7 +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/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 \
&& ( \ && ( \
@ -295,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
##################################### #####################################
@ -371,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 \
@ -380,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

@ -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

@ -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.1-soap \ apt-get -y install libxml2-dev php7.1-soap \
;fi ;fi
@ -124,9 +128,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 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
@ -146,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
@ -271,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 \
&& ( \ && ( \
@ -291,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.1/cli/conf.d/aerospike.ini \ rm /etc/php/7.1/cli/conf.d/aerospike.ini \
;fi ;fi
@ -300,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 php-xml php-dev php-pear libv8-5.4 \
&& pecl install v8js \ && pecl install v8js \
&& echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini \ && echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini \
;fi ;fi
@ -367,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 \
@ -376,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 && \
@ -389,6 +395,85 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \ echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
;fi ;fi
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=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: # Minio:
##################################### #####################################