Compare commits

..

115 Commits

Author SHA1 Message Date
d0c0a8895e add global instance of larval installer for fresh projects. (#988) 2017-05-30 09:05:30 -05:00
e23ecb6a11 fix mssql startup (#985)
- Sleep 45s is invalid
- /opt/mssql/bin/sqlservr is the correct path for mssql binary
2017-05-30 09:05:09 -05:00
f296a39bf5 Merge pull request #975 from bestlong/fix-jenkins-permission-denied
fix jenkins permission denied
2017-05-25 07:40:20 -05:00
f04acee6df fix jenkins permission denied 2017-05-25 20:04:21 +08:00
992c76d29c Merge pull request #974 from bestlong/adminer-support-sqlsrv
adminer support mssql
2017-05-25 04:49:07 -05:00
f3a016aa79 adminer support mssql 2017-05-25 16:44:51 +08:00
58995966ec Merge pull request #972 from bestlong/put-data-in-tmp-folder-may-lost-and-no-permit
Change DATA_SAVE_PATH default value avoid lost data
2017-05-24 21:53:38 -05:00
c913c429c0 change DATA_SAVE_PATH 2017-05-25 10:04:41 +08:00
d4caddcaed move default config DATA_SAVE_PATH from /tmp to ~/.laradocc/data
avoid lost data and windows no have /tmp folder.
2017-05-25 09:56:14 +08:00
8d7b3a84be Merge pull request #971 from bestlong/adjustment-travis-ci
[Travis-CI] using set -x could produce more debug info.
2017-05-24 20:40:55 -05:00
fc8ffe5731 using set -x could produce more debug info. 2017-05-25 09:33:40 +08:00
bf4a5beb0b Fix typo (#962)
sumit -> submit
2017-05-23 13:52:19 +08:00
3288c20658 Merge pull request #958 from bestlong/mssql-ext-build-failed
Fixing php-fpm install mssql extension build failed
2017-05-19 22:31:00 -05:00
5a8df95fd3 fixing PHP7.0 php-fpm mssql extension build failed 2017-05-20 10:35:41 +08:00
43545cefd2 fixing PHP7.1 php-fpm mssql extension build failed 2017-05-20 09:20:00 +08:00
71364f962e fix php-fpm show warning not install extension (#954) 2017-05-19 17:00:13 +08:00
b2ad5f16e8 Merge pull request #888 from tristanbailey/patch-1
Update Redis Docker File
2017-05-16 02:58:12 +02:00
5dc4db40f7 Merge pull request #939 from Viktorminator/patch-1
Update index.md
2017-05-14 20:50:29 +02:00
cec83afe45 Merge pull request #943 from wxb/master
edit docker-compose.yml, add swoole config
2017-05-14 20:48:39 +02:00
wxb
01f6d8f038 edit docker-compose.yml, add swoole config 2017-05-15 02:07:45 +08:00
a90a3c1d28 Merge pull request #941 from zeroc0d3/master
Update badges laradock
2017-05-14 10:44:23 +02:00
a1bc99ef4e Update badges laradock 2017-05-14 14:21:50 +07:00
35efcc4a7c Update index.md 2017-05-13 20:51:19 +03:00
c85fd97e00 Merge pull request #938 from bestlong/percona-use-data-save-path
Percona service use DATA_SAVE_PATH env var
2017-05-13 10:00:33 -05:00
895a24f332 Adding amazing members to the Laradock team
Welcome @sixlive and @bestlong :)
2017-05-13 17:41:44 +03:00
6ff7f4a402 percona service use DATA_SAVE_PATH env var, same way mysql, mariadb. 2017-05-13 22:04:35 +08:00
109e596417 Merge pull request #937 from bestlong/fix-percona-create-multiple-db-user-cant-see
Fixing Percona service create multiple db solution
2017-05-13 16:47:43 +03:00
20fddc6de7 fix percona service create multiple db solution user can’t see other db problem. 2017-05-13 21:37:25 +08:00
1eaac78fdd Merge pull request #936 from bestlong/fix-mariadb-create-multiple-db-user-cant-see
Fixing MariaDB service create multiple db solution
2017-05-13 13:45:40 +02:00
855241d966 fix mariadb service create multiple db solution user can’t see other db problem. 2017-05-13 11:00:36 +08:00
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
c31e002064 Update Redis Docker File
The dir for the conf seems to be missing from the base image, so the copy fails

Also if the server does not start with the conf as parameter it will not pick it up. Which leaves Redis wide open to attack by default:

Example try to telnet to your ip on the redis port for this container:   
telnet 192.168.1.11 6379  
echo "Hey no AUTH required!"
2017-05-04 08:22:32 +01: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
33 changed files with 915 additions and 436 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
env:
matrix:
- PHP_VERSION=56
- PHP_VERSION=70
- PHP_VERSION=71
matrix:
- 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 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
- 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
# 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
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>
<a name="Add-Docker-Images"></a>
## 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/).
@ -1239,11 +1258,11 @@ You are free to modify the `aliases.sh` as you see fit, adding your own aliases
<br>
a) open the `docker-compose.yml` file
<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>
c) set it to `true`
<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>
e) set it to `true`
@ -1254,13 +1273,13 @@ It should be like this:
build:
context: ./workspace
args:
- INSTALL_AEROSPIKE_EXTENSION=true
- INSTALL_AEROSPIKE=true
...
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_AEROSPIKE_EXTENSION=true
- INSTALL_AEROSPIKE=true
...
```

View File

@ -4,32 +4,34 @@ type: index
weight: 2
---
# Requirements
## Requirements
- [Git](https://git-scm.com/downloads)
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
# Installation
## Installation
Choose the setup the best suits your needs.
- [A) Setup for Single Project](#A)
- [A.1) Already have a PHP project](#A1)
- [A.2) Don't have a PHP project yet](#A2)
- [A.1) Already have a PHP project](#A1)
- [A.2) Don't have a PHP project yet](#A2)
- [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)
[]()
## 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:
@ -37,9 +39,10 @@ Choose the setup the best suits your needs.
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:
@ -50,13 +53,12 @@ Your folder structure should look like this:
+ 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.**
[]()
## A.2) Don't have a PHP project yet:
<a name="A2"></a>
### A.2) Don't have a PHP project yet:
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.**
[]()
## 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)
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
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.**
[]()
# Usage
<a name="Usage"></a>
## Usage
**Read Before starting:**
If you are using **Docker Toolbox** (VM), do one of the following:
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
- Use Laradock v3.*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. _(outdated)_
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
<br>
> **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>
@ -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.
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:
@ -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`.
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>
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
```
_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
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
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>
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
```
_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>
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
---
- [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
## Install Docker
@ -52,6 +55,10 @@ $root@server:~/laravel/ cd laradock
$root@server:~/laravel/laradock# curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
$root@server:~/chmod +x /usr/local/bin/docker-compose
```
## Enter the laradock folder and rename env-example to .env.
```
$root@server:~/laravel/laradock# cp env-example .env
```
## Create Your Laradock Containers
@ -104,7 +111,7 @@ ns3.digitalocean.com
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.
@ -135,8 +142,8 @@ And add `server_name` (your custom domain)
## Rebuild Your Nginx
```
$root@server:~/laravel/laradock/nginx# docker-compose down
$root@server:~/laravel/laradock/nginx# docker-compose build nginx
$root@server:~/laravel/laradock# docker-compose down
$root@server:~/laravel/laradock# docker-compose build nginx
```
## Re Run Your Containers MYSQL and NGINX
@ -145,7 +152,7 @@ $root@server:~/laravel/laradock/nginx# docker-compose build nginx
$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
@ -165,7 +172,7 @@ Remove 0.0.0.0:80
root /var/www/public
```
and replace with your <https://yourdomain.com>
and replace with your https://yourdomain.com
```
https://yourdomain.com
@ -214,93 +221,83 @@ $root@server:~/laravel/laradock/caddy# docker-compose down
$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**
> 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
- [Intro](#Intro)
- [Installation](#Installation)
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose)
- [Clean House](#InstallCleanHouse)
- [Laradock Dial Tone](#InstallLaradockDialTone)
- [hosts](#AddToHosts)
- [Firewall](#FireWall)
- [Enable xDebug on php-fpm](#enablePhpXdebug)
- [PHPStorm Settings](#InstallPHPStorm)
- [Configs](#InstallPHPStormConfigs)
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose)
- [Clean House](#InstallCleanHouse)
- [Laradock Dial Tone](#InstallLaradockDialTone)
- [hosts](#AddToHosts)
- [Firewall](#FireWall)
- [Enable xDebug on php-fpm](#enablePhpXdebug)
- [PHPStorm Settings](#InstallPHPStorm)
- [Configs](#InstallPHPStormConfigs)
- [Usage](#Usage)
- [Laravel](#UsageLaravel)
- [Run ExampleTest](#UsagePHPStormRunExampleTest)
- [Debug ExampleTest](#UsagePHPStormDebugExampleTest)
- [Debug Web Site](#UsagePHPStormDebugSite)
- [Laravel](#UsageLaravel)
- [Run ExampleTest](#UsagePHPStormRunExampleTest)
- [Debug ExampleTest](#UsagePHPStormDebugExampleTest)
- [Debug Web Site](#UsagePHPStormDebugSite)
- [SSH into workspace](#SSHintoWorkspace)
- [KiTTY](#InstallKiTTY)
- [KiTTY](#InstallKiTTY)
[]()
<a name="Intro"></a>
## 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
- 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.
- you have installed Laravel as a parent of `laradock`. This guide assumes `/c/_dk/laravel`.
[]()
<a name="AddToHosts"></a>
## 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` On Windows you can find it by opening Windows `Hyper-V Manager`.
- ![Windows Hyper-V Manager](images/photos/PHPStorm/Settings/WindowsHyperVManager.png)
- 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`.
- ![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.
- 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
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.
- 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
Set the following variables:
```
### Workspace Utilities Container ###############
@ -321,15 +318,14 @@ Set the following variables:
args:
- INSTALL_XDEBUG=true
...
```
### Edit xdebug.ini files
- `laradock/workspace/xdebug.ini`
- `laradock/php-fpm/xdebug.ini`
Set the following variables:
```
xdebug.remote_autostart=1
xdebug.remote_enable=1
@ -337,19 +333,23 @@ xdebug.remote_connect_back=1
xdebug.cli_color=1
```
[]()
<a name="InstallCleanHouse"></a>
### 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 {}` **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`
- 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`
- I added this to my `.bashrc` to remove orphaned images.
```
```
dclean() {
processes=`docker ps -q -f status=exited`
if [ -n "$processes" ]; thend
@ -361,35 +361,33 @@ Make sure you are starting with a clean state. For example, do you have other La
docker rmi $images
fi
}
```
```
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
```
# 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 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_
# does NOT delete laradock/* which are hub images
echo 'Removing ALL images associated with laradock_'
docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}
# remove ALL images associated with laradock_
# does NOT delete laradock/* which are hub images
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...'
docker images | grep laradock
echo 'Listing all laradock docker hub images...'
docker images | grep laradock
echo 'dcleanlaradock completed'
}
# associate the above function with an alias
# so can recall/lookup by typing 'alias'
alias dcleanlaradock=dcleanlaradockfunction
```
[]()
echo 'dcleanlaradock completed'
}
# 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
```
@ -408,14 +406,14 @@ laradock_php-fpm_1 php-fpm Up 9000/tcp
laradock_volumes_data_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
```
[]()
<a name="enablePhpXdebug"></a>
## Enable xDebug on php-fpm
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status` You should see something like the following:
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
You should see something like the following:
```
xDebug status
laradock_php-fpm_1
@ -424,150 +422,129 @@ Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
```
Other commands include `.php-fpm/xdebug start | stop`.
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
- 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
[]()
<a name="UsagePHPStormRunExampleTest"></a>
### Run ExampleTest
- 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`.
- Should pass!! You just ran a remote test via SSH!
[]()
<a name="UsagePHPStormDebugExampleTest"></a>
### Debug ExampleTest
- Open to edit: `tests/ExampleTest.php`
- Add a BreakPoint on line 16: `$this->visit('/')`
- 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
- In case xDebug is disabled, from the `laradock` folder run: `.php-fpm/xdebug start`.
- To switch xdebug off, run: `.php-fpm/xdebug stop`
- In case xDebug is disabled, from the `laradock` folder run:
`.php-fpm/xdebug start`.
- To switch xdebug off, run:
`.php-fpm/xdebug stop`
- Start Remote Debugging
- ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
- ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
- Open to edit: `bootstrap/app.php`
- Add a BreakPoint on line 14: `$app = new Illuminate\Foundation\Application(`
- 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
Assuming that you are in laradock folder, type: `ssh -i workspace/insecure_id_rsa -p2222 root@laravel` **Cha Ching!!!!**
Assuming that you are in laradock folder, type:
`ssh -i workspace/insecure_id_rsa -p2222 root@laravel`
**Cha Ching!!!!**
- `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`
- import `workspace/insecure_id_rsa`
- save private key to `workspace/insecure_id_rsa.ppk`
[]()
<a name="InstallKiTTY"></a>
### KiTTY
[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:
- ![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

@ -108,7 +108,7 @@ You can choose, which tools to install in your workspace container and other con
If you can't find your Software in the list, build it yourself and sumit it. Contributions are welcomed :)
If you can't find your Software in the list, build it yourself and submit it. Contributions are welcomed :)

View File

@ -1,6 +1,6 @@
![](https://s19.postimg.org/jblfytw9f/laradock-logo.jpg)
[![Build Status](https://travis-ci.org/laradock/laradock.svg?branch=master)](https://travis-ci.org/laradock/laradock)
[![Build Status](https://travis-ci.org/laradock/laradock.svg?branch=master)](https://travis-ci.org/laradock/laradock) [![GitHub issues](https://img.shields.io/github/issues/laradock/laradock.svg)](https://github.com/laradock/laradock/issues) [![GitHub forks](https://img.shields.io/github/forks/laradock/laradock.svg)](https://github.com/laradock/laradock/network) [![GitHub stars](https://img.shields.io/github/stars/laradock/laradock.svg)](https://github.com/laradock/laradock/stargazers) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/laradock/laradock/master/LICENSE)
> Use Docker first and learn about it later.
@ -23,6 +23,8 @@ A Docker PHP development environment that facilitates running **PHP** Apps on **
- [Dwi Fahni Denni](https://github.com/zeroc0d3) @zeroc0d3
- [Thor Erik](https://github.com/thorerik) @thorerik
- [Winfried van Loon](https://github.com/winfried-van-loon) @winfried-van-loon
- [TJ Miller](https://github.com/sixlive) @sixlive
- [Yu-Lung Shao (Allen)](https://github.com/bestlong) @bestlong
- Join Us.
## License

View File

@ -8,5 +8,22 @@ MAINTAINER Patrick Artounian <partounian@gmail.com>
# Add volume for sessions to allow session persistence
VOLUME /sessions
#####################################
# SQL SERVER:
#####################################
USER root
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
set -xe \
&& apk --update add --no-cache --virtual .phpize-deps $PHPIZE_DEPS unixodbc unixodbc-dev \
&& pecl channel-update pecl.php.net \
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
&& echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
;fi
USER adminer
# We expose Adminer on port 8080 (Adminer's default)
EXPOSE 8080

View File

@ -19,14 +19,16 @@ services:
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
- INSTALL_AEROSPIKE_EXTENSION=${WORKSPACE_INSTALL_AEROSPIKE_EXTENSION}
- INSTALL_V8JS_EXTENSION=${WORKSPACE_INSTALL_V8JS_EXTENSION}
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
- INSTALL_LARAVEL_INSTALLER=${WORKSPACE_INSTALL_LARAVEL_INSTALLER}
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
@ -59,17 +61,20 @@ services:
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
- INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL}
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
- INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
- 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_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
dockerfile: "Dockerfile-${PHP_VERSION}"
volumes_from:
- applications
@ -95,6 +100,8 @@ services:
- applications
depends_on:
- workspace
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
networks:
- backend
@ -192,6 +199,7 @@ services:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports:
- "${MYSQL_PORT}:3306"
networks:
@ -208,7 +216,8 @@ services:
- MYSQL_PASSWORD=${PERCONA_PASSWORD}
- MYSQL_ROOT_PASSWORD=${PERCONA_ROOT_PASSWORD}
volumes:
- percona:/var/lib/mysql
- ${DATA_SAVE_PATH}/percona:/var/lib/mysql
- ./percona/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports:
- "${PERCONA_PORT}:3306"
networks:
@ -236,6 +245,7 @@ services:
build: ./mariadb
volumes:
- ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
- ./mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports:
- "${MARIADB_PORT}:3306"
environment:
@ -295,7 +305,7 @@ services:
mongo:
build: ./mongo
ports:
- "27017:27017"
- "${MONGODB_PORT}:27017"
volumes:
- ${DATA_SAVE_PATH}/mongo:/data/db
networks:
@ -306,7 +316,7 @@ services:
rethinkdb:
build: ./rethinkdb
ports:
- "8090:8080"
- "${RETHINKDB_PORT}:8080"
volumes:
- ${DATA_SAVE_PATH}/rethinkdb:/data/rethinkdb_data
networks:
@ -332,10 +342,10 @@ services:
volumes:
- ${DATA_SAVE_PATH}/aerospike:/opt/aerospike/data
ports:
- "3000:3000"
- "3001:3001"
- "3002:3002"
- "3003:3003"
- "${AEROSPIKE_SERVICE_PORT}:3000"
- "${AEROSPIKE_FABRIC_PORT}:3001"
- "${AEROSPIKE_HEARTBEAT_PORT}:3002"
- "${AEROSPIKE_INFO_PORT}:3003"
networks:
- backend
@ -396,16 +406,15 @@ services:
caddy:
build: ./caddy
ports:
- "80:80"
- "443:443"
- "2015:2015"
volumes_from:
- applications
volumes:
- ./caddy/Caddyfile:/etc/Caddyfile
- ./logs/caddy:/var/log/caddy
- caddy:/root/.caddy
- ${CADDY_CUSTOM_CADDYFILE}:/etc/Caddyfile
- ${CADDY_HOST_LOG_PATH}:/var/log/caddy
- ${DATA_SAVE_PATH}:/root/.caddy
ports:
- "${CADDY_HOST_HTTP_PORT}:80"
- "${CADDY_HOST_HTTPS_PORT}:443"
depends_on:
- php-fpm
networks:
@ -432,7 +441,10 @@ services:
### Adminer Container ####################################
adminer:
build: ./adminer
build:
context: ./adminer
args:
- INSTALL_MSSQL=${ADM_INSTALL_MSSQL}
ports:
- "${ADM_PORT}:8080"
depends_on:
@ -566,6 +578,10 @@ services:
volumes:
- ${JENKINS_HOME}:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
networks:
- frontend
- backend
### Networks Setup ############################################

View File

@ -10,7 +10,7 @@ APPLICATION=../
### Data Path:
# For all storage systems.
DATA_SAVE_PATH=/tmp
DATA_SAVE_PATH=~/.laradock/data
### PHP version
# Applies to the Workspace and PHP-FPM containers (Does not apply to HHVM)
@ -32,14 +32,16 @@ PHP_INTERPRETER=php-fpm
WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_SOAP=false
WORKSPACE_INSTALL_MONGO=false
WORKSPACE_INSTALL_MSSQL=false
WORKSPACE_INSTALL_NODE=false
WORKSPACE_INSTALL_YARN=false
WORKSPACE_INSTALL_DRUSH=false
WORKSPACE_INSTALL_AEROSPIKE_EXTENSION=false
WORKSPACE_INSTALL_V8JS_EXTENSION=false
WORKSPACE_INSTALL_AEROSPIKE=false
WORKSPACE_INSTALL_V8JS=false
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_LARAVEL_ENVOY=false
WORKSPACE_INSTALL_LARAVEL_INSTALLER=false
WORKSPACE_INSTALL_DEPLOYER=false
WORKSPACE_INSTALL_LINUXBREW=false
WORKSPACE_INSTALL_MC=false
@ -54,6 +56,7 @@ WORKSPACE_SSH_PORT=2222
PHP_FPM_INSTALL_XDEBUG=false
PHP_FPM_INSTALL_MONGO=false
PHP_FPM_INSTALL_MSSQL=false
PHP_FPM_INSTALL_SOAP=false
PHP_FPM_INSTALL_ZIP_ARCHIVE=false
PHP_FPM_INSTALL_BCMATH=false
@ -61,11 +64,13 @@ PHP_FPM_INSTALL_PHPREDIS=false
PHP_FPM_INSTALL_MEMCACHED=false
PHP_FPM_INSTALL_OPCACHE=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_TOKENIZER=false
PHP_FPM_INSTALL_INTL=false
PHP_FPM_INSTALL_GHOSTSCRIPT=false
PHP_FPM_INSTALL_LDAP=false
PHP_FPM_INSTALL_SWOOLE=false
### NGINX ##############################################################################################################
@ -157,6 +162,7 @@ MINIO_PORT=9000
### ADMINER ############################################################################################################
ADM_PORT=8080
ADM_INSTALL_MSSQL=false
### PHP MY ADMIN #######################################################################################################
@ -213,6 +219,28 @@ BLACKFIRE_CLIENT_TOKEN=<client_token>
BLACKFIRE_SERVER_ID=<server_id>
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 .................................

0
jenkins/install-plugins.sh Normal file → Executable file
View File

0
jenkins/jenkins-support Normal file → Executable file
View File

0
jenkins/jenkins.sh Normal file → Executable file
View File

0
jenkins/plugins.sh Normal file → Executable file
View File

0
jenkins/publish.sh Normal file → Executable file
View File

0
jenkins/update-official-library.sh Normal file → Executable file
View File

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 mariadb container start and $DATA_SAVE_PATH/mariadb not exists.
###
### if your $DATA_SAVE_PATH/mariadb is exists and you do not want to delete it, you can run by manual execution:
###
### docker-compose exec mariadb bash
### mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
###
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_2` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_2`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_3` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_3`.* TO 'default'@'%' ;
FLUSH PRIVILEGES ;

View File

@ -1,5 +1,5 @@
#wait for the SQL Server to come up
sleep 45s
sleep 45
#run the setup script to create the DB and the schema in the DB
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql

View File

@ -1,2 +1,2 @@
#start SQL Server, start the script to create the DB and import the data, start the app
/opt/mssql/bin/sqlservr.sh & /usr/src/app/create_table.sh & tail -f /dev/null
/opt/mssql/bin/sqlservr & /usr/src/app/create_table.sh & tail -f /dev/null

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

View File

@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the soap extension
apt-get -y update && \
apt-get update -yqq && \
apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \
;fi
@ -92,6 +92,17 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
&& docker-php-ext-enable redis \
;fi
#####################################
# Swoole EXTENSION FOR PHP 5
#####################################
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
;fi
#####################################
# MongoDB:
#####################################
@ -148,13 +159,13 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
# PHP Aerospike:
#####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging
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
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 \
&& 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
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
# Install the ghostscript extension for PDF editing
apt-get update && \
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
#
#--------------------------------------------------------------------------
# Final Touch

View File

@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the soap extension
apt-get -y update && \
apt-get update -yqq && \
apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \
;fi
@ -89,6 +89,17 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
&& docker-php-ext-enable redis \
;fi
#####################################
# Swoole EXTENSION FOR PHP 7
#####################################
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
;fi
#####################################
# MongoDB:
#####################################
@ -156,13 +167,13 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
# PHP Aerospike:
#####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging
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
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 \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \
@ -205,86 +216,6 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
docker-php-ext-install tokenizer \
;fi
#####################################
# SQL SERVER:
#####################################
ARG MSSQL=false
RUN if [ ${MSSQL} = true ]; then \
#####################################
# Install Depenencies:
#####################################
apt-get update && \
apt-get install -y --force-yes wget apt-transport-https curl freetds-common php5-odbc libsybdb5 freetds-bin unixodbc unixodbc-dev php5-sybase && \
#####################################
# The following steps were taken from
# Microsoft's github account:
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
#####################################
# Add PHP 7 repository
# for Debian jessie
# And System upgrade
echo "deb http://packages.dotdeb.org jessie all" \
| tee /etc/apt/sources.list.d/dotdeb.list \
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
| apt-key add - \
&& apt-get update \
&& apt-get upgrade -qq && \
# Install UnixODBC
# Compile odbc_config as it is not part of unixodbc package
apt-get install -y whiptail \
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
&& cd unixodbc-*/ \
&& dpkg-buildpackage -uc -us -B -d \
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
# Fake uname for install.sh
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
| tee /usr/local/bin/uname \
&& chmod +x /usr/local/bin/uname && \
# Microsoft ODBC Driver 13 for Linux
# Note: There's a copy of this tar on my hubiC
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
&& cd msodbcsql-*/ \
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
&& ./install.sh install --accept-license \
&& ls -l /opt/microsoft/msodbcsql/ \
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" \
#####################################
# Install pdo_dblib
#####################################
&& docker-php-ext-install pdo \
&& docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
&& docker-php-ext-install pdo_dblib \
&& docker-php-ext-enable pdo_dblib && \
#####################################
# Install sqlsrv y pdo_sqlsrv
# extensions:
#####################################
pecl install sqlsrv-4.0.6 && \
pecl install pdo_sqlsrv-4.0.6 && \
#####################################
# Set locales for the container
#####################################
apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
;fi
#####################################
# Human Language and Character Encoding Support:
#####################################
@ -292,8 +223,8 @@ RUN if [ ${MSSQL} = true ]; then \
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++ && \
apt-get update -yqq && \
apt-get install -y zlib1g-dev libicu-dev g++ && \
docker-php-ext-configure intl && \
docker-php-ext-install intl \
;fi
@ -306,19 +237,58 @@ ARG INSTALL_GHOSTSCRIPT=false
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
# Install the ghostscript extension
# for PDF editing
apt-get -y update \
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 \
#####################################
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
#####################################
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
apt-get update -yqq \
&& apt-get install -y apt-transport-https \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/8/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update -yqq \
# Install Dependencies
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
;fi
#
#--------------------------------------------------------------------------
# Final Touch
#--------------------------------------------------------------------------
#
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./laravel.ini /usr/local/etc/php/conf.d/
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/*

View File

@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the soap extension
apt-get -y update && \
apt-get update -yqq && \
apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \
;fi
@ -89,6 +89,17 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
&& docker-php-ext-enable redis \
;fi
#####################################
# Swoole EXTENSION FOR PHP 7
#####################################
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
;fi
#####################################
# MongoDB:
#####################################
@ -156,13 +167,19 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
# PHP Aerospike:
#####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging
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
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 \
&& 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 \
) \
&& 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
#####################################
@ -202,7 +222,7 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \
ARG INSTALL_TOKENIZER=false
RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
docker-php-ext-install tokenizer \
docker-php-ext-install tokenizer \
;fi
#####################################
@ -212,7 +232,7 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
ARG INSTALL_INTL=false
RUN if [ ${INSTALL_INTL} = true ]; then \
# Install intl and requirements
apt-get -y update && \
apt-get update -yqq && \
apt-get install -y zlib1g-dev libicu-dev g++ && \
docker-php-ext-configure intl && \
docker-php-ext-install intl \
@ -226,12 +246,49 @@ ARG INSTALL_GHOSTSCRIPT=false
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
# Install the ghostscript extension
# for PDF editing
apt-get -y update \
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 \
#####################################
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
#####################################
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
apt-get update -yqq && apt-get install -y apt-transport-https \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/8/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update -yqq \
# Install Dependencies
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
;fi
#
#--------------------------------------------------------------------------
# Final Touch

View File

@ -11,6 +11,3 @@ upload_max_filesize = 20M
; Sets max size of post data allowed.
; http://php.net/post-max-size
post_max_size = 20M
; Enables the MSSQL extensions
extension=sqlsrv.so
extension=pdo_sqlsrv.so

View File

@ -2,10 +2,13 @@ FROM redis:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
## For security settings uncomment, make the dir, copy conf, and also start with the conf, to use it
#RUN mkdir -p /usr/local/etc/redis
#COPY redis.conf /usr/local/etc/redis/redis.conf
VOLUME /data
EXPOSE 6379
#CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
CMD ["redis-server"]

View File

@ -1,11 +1,21 @@
#!/usr/bin/env bash
#### halt script on error
set -xe
echo '##### Print docker version'
docker --version
echo '##### Print environment'
env | sort
#### Build the Docker Images
if [ -n "${PHP_VERSION}" ]; then
cp env-example .env
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
sed -i -- 's/=false/=true/g' .env
cat .env
docker-compose build
docker-compose build ${BUILD_SERVICE}
docker images
fi
@ -20,7 +30,9 @@ if [ -n "${HUGO_VERSION}" ]; then
mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo
# Remove existing docs
rm -r ./docs
if [ -d "./docs" ]; then
rm -r ./docs
fi
# Build docs
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.
ARG PUID=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:
@ -60,8 +64,8 @@ ENV INSTALL_SOAP ${INSTALL_SOAP}
RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the PHP SOAP extension
apt-get -y update && \
add-apt-repository -y ppa:ondrej/php && \
apt-get update -yqq && \
apt-get -y install libxml2-dev php5.6-soap \
;fi
@ -128,9 +132,8 @@ RUN echo "" >> ~/.bashrc && \
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get update && \
apt-get install -y --force-yes 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 \
;fi
# 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 \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \
apt-get update -yqq && \
apt-get install blackfire-agent \
;fi
@ -275,15 +278,15 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
#####################################
USER root
ARG INSTALL_AEROSPIKE_EXTENSION=true
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
ARG INSTALL_AEROSPIKE=true
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging
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
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 \
&& 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 \
;fi
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
rm /etc/php/5.6/cli/conf.d/aerospike.ini \
;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
#####################################
@ -347,6 +333,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
composer global require "laravel/envoy=~1.0" \
;fi
#####################################
# Laravel Installer:
#####################################
USER root
ARG INSTALL_LARAVEL_INSTALLER=true
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
# Install the Laravel Installer
echo "" >> ~/.bashrc && \
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
&& composer global require "laravel/installer" \
;fi
USER laradock
#####################################
# Deployer:
#####################################
@ -371,7 +374,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
# Preparation
apt-get update && \
apt-get upgrade -y && \
apt-get install -y build-essential make cmake scons curl git \
ruby autoconf automake autoconf-archive \
@ -380,7 +382,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
libexpat-dev libncurses-dev && \
# 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 '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.
ARG PUID=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:
@ -60,8 +64,8 @@ ENV INSTALL_SOAP ${INSTALL_SOAP}
RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the PHP SOAP extension
apt-get -y update && \
add-apt-repository -y ppa:ondrej/php && \
apt-get update -yqq && \
apt-get -y install libxml2-dev php7.0-soap \
;fi
@ -128,9 +132,8 @@ RUN echo "" >> ~/.bashrc && \
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get update && \
apt-get install -y --force-yes php7.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 \
;fi
# 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 \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \
apt-get update -yqq && \
apt-get install blackfire-agent \
;fi
@ -275,15 +278,15 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
#####################################
USER root
ARG INSTALL_AEROSPIKE_EXTENSION=true
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
ARG INSTALL_AEROSPIKE=true
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging
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
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 \
&& 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 \
;fi
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
rm /etc/php/7.0/cli/conf.d/aerospike.ini \
;fi
@ -304,14 +307,14 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
#####################################
USER root
ARG INSTALL_V8JS_EXTENSION=false
ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION}
ARG INSTALL_V8JS=false
ENV INSTALL_V8JS ${INSTALL_V8JS}
RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \
RUN if [ ${INSTALL_V8JS} = 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 \
&& apt-get update -yqq \
&& apt-get install -y php7.0-xml php7.0-dev php-pear libv8-5.4 \
&& pecl install v8js \
&& echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \
;fi
@ -347,6 +350,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
composer global require "laravel/envoy=~1.0" \
;fi
#####################################
# Laravel Installer:
#####################################
USER root
ARG INSTALL_LARAVEL_INSTALLER=true
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
# Install the Laravel Installer
echo "" >> ~/.bashrc && \
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
&& composer global require "laravel/installer" \
;fi
USER laradock
#####################################
# Deployer:
#####################################
@ -371,7 +391,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
# Preparation
apt-get update && \
apt-get upgrade -y && \
apt-get install -y build-essential make cmake scons curl git \
ruby autoconf automake autoconf-archive \
@ -380,7 +399,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
libexpat-dev libncurses-dev && \
# 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 '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 +412,83 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
;fi
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=true
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# Install Depenencies:
#####################################
cd / && \
apt-get 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:
#####################################
@ -429,8 +525,6 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
;fi
USER laradock
#
#--------------------------------------------------------------------------
# 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.
ARG PUID=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:
@ -60,8 +64,8 @@ ENV INSTALL_SOAP ${INSTALL_SOAP}
RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the PHP SOAP extension
apt-get -y update && \
add-apt-repository -y ppa:ondrej/php && \
apt-get update -yqq && \
apt-get -y install libxml2-dev php7.1-soap \
;fi
@ -124,9 +128,8 @@ RUN echo "" >> ~/.bashrc && \
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get update && \
apt-get install -y --force-yes 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 \
;fi
# 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 \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \
apt-get update -yqq && \
apt-get install blackfire-agent \
;fi
@ -271,15 +274,19 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
#####################################
USER root
ARG INSTALL_AEROSPIKE_EXTENSION=true
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging
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
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 \
&& 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 \
;fi
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
rm /etc/php/7.1/cli/conf.d/aerospike.ini \
;fi
@ -300,14 +307,14 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
#####################################
USER root
ARG INSTALL_V8JS_EXTENSION=false
ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION}
ARG INSTALL_V8JS=false
ENV INSTALL_V8JS ${INSTALL_V8JS}
RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \
RUN if [ ${INSTALL_V8JS} = 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 \
&& apt-get update -yqq \
&& apt-get install -y php-xml php-dev php-pear libv8-5.4 \
&& pecl install v8js \
&& echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini \
;fi
@ -343,6 +350,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
composer global require "laravel/envoy=~1.0" \
;fi
#####################################
# Laravel Installer:
#####################################
USER root
ARG INSTALL_LARAVEL_INSTALLER=true
ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
# Install the Laravel Installer
echo "" >> ~/.bashrc && \
echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \
&& composer global require "laravel/installer" \
;fi
USER laradock
#####################################
# Deployer:
#####################################
@ -367,7 +391,6 @@ ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW}
RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
# Preparation
apt-get update && \
apt-get upgrade -y && \
apt-get install -y build-essential make cmake scons curl git \
ruby autoconf automake autoconf-archive \
@ -376,7 +399,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
libexpat-dev libncurses-dev && \
# 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 '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 +412,85 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \
;fi
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=true
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# Install Depenencies:
#####################################
cd / && \
apt-get update -yqq && \
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
#####################################
# The following steps were taken from
# Microsoft's github account:
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
#####################################
# Add PHP 7 repository
# for Debian jessie
# And System upgrade
cd / && \
echo "deb http://packages.dotdeb.org jessie all" \
| tee /etc/apt/sources.list.d/dotdeb.list \
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
| apt-key add - \
&& apt-get update -yqq \
&& apt-get upgrade -qq && \
# Install UnixODBC
# Compile odbc_config as it is not part of unixodbc package
cd / && \
apt-get update -yqq && \
apt-get install -y whiptail \
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
&& cd unixodbc-*/ \
&& ./configure && make && make install \
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
# Fake uname for install.sh
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
| tee /usr/local/bin/uname \
&& chmod +x /usr/local/bin/uname && \
# Microsoft ODBC Driver 13 for Linux
# Note: There's a copy of this tar on my hubiC
cd / && \
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
&& cd msodbcsql-*/ \
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
&& ./install.sh install --accept-license \
&& ls -l /opt/microsoft/msodbcsql/ \
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
#####################################
# Install sqlsrv y pdo_sqlsrv
# extensions:
#####################################
pecl install sqlsrv-4.0.8 && \
pecl install pdo_sqlsrv-4.0.8 && \
#####################################
# Set locales for the container
#####################################
apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& echo "extension=sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-sqlsrv.ini \
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-pdo_sqlsrv.ini \
;fi
#####################################
# Minio:
#####################################