laradock/DOCUMENTATION/content/introduction/index.md

470 lines
23 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 1. Introduction
type: index
weight: 1
---
![](https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/laradock-logo.jpg)
## Use Docker First - Then Learn About It Later
Laradock is a PHP development environment that runs on Docker.
Supports a variety of useful Docker Images, pre-configured to provide a wonderful PHP development environment.
---
<a name="sponsors"></a>
## Sponsors
<a href="https://opencollective.com/socketio/sponsor/23/website" target="_blank"><img src="https://opencollective.com/socketio/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/laradock/sponsor/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/3/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/4/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/4/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/5/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/5/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/6/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/6/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/7/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/7/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/8/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/8/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/9/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/9/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/10/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/10/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/11/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/11/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/12/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/12/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/13/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/13/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/14/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/14/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/15/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/15/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/16/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/16/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/17/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/17/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/18/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/18/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/19/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/19/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/20/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/20/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/21/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/21/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/22/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/22/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/23/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/23/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/24/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/24/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/25/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/25/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/26/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/26/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/27/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/27/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/28/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/28/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/29/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/29/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/30/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/30/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/31/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/31/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/32/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/32/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/33/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/33/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/34/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/34/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/35/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/35/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/36/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/36/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/37/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/37/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/38/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/38/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/39/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/39/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/40/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/40/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/41/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/41/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/42/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/42/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/43/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/43/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/44/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/44/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/45/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/45/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/46/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/46/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/47/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/47/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/48/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/48/avatar.svg?requireActive=false"></a>
<a href="https://opencollective.com/laradock/sponsor/49/website?requireActive=false" target="_blank"><img src="https://opencollective.com/laradock/sponsor/49/avatar.svg?requireActive=false"></a>
Support Laradock with your [organization](https://opencollective.com/laradock/contribute/).
<br>
Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page.
<br>
For more info contact <a href = "mailto: support@laradock.io">support@laradock.io</a>.
---
## Quick Overview
Let's see how easy it is to setup our demo stack `PHP`, `NGINX`, `MySQL`, `Redis` and `Composer`:
1 - Clone Laradock inside your PHP project:
```shell
git clone https://github.com/Laradock/laradock.git
```
2 - Enter the laradock folder and rename `env-example` to `.env`.
```shell
cp env-example .env
```
3 - Run your containers:
```shell
docker-compose up -d nginx mysql phpmyadmin redis workspace
```
4 - Open your project's `.env` file and set the following:
```shell
DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd
```
5 - Open your browser and visit localhost: `http://localhost`.
```shell
That's it! enjoy :)
```
<a name="features"></a>
## Features
- Easy switch between PHP versions: 7.3, 7.2, 7.1, 5.6...
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
- Run your own stack: Memcached, HHVM, RabbitMQ...
- Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI...
- Easy to customize any container, with simple edit to the `Dockerfile`.
- All Images extends from an official base Image. (Trusted base Images).
- Pre-configured NGINX to host any code at your root directory.
- Can use Laradock per project, or single Laradock for all projects.
- Easy to install/remove software's in Containers using environment variables.
- Clean and well structured Dockerfiles (`Dockerfile`).
- Latest version of the Docker Compose file (`docker-compose`).
- Everything is visible and editable.
- Fast Images Builds.
<a name="Supported-Containers"></a>
## Supported Software (Docker Images)
> Laradock, adheres to the 'separation of concerns' principle, thus it runs each software on its own Docker Container.
> You can turn On/Off as many instances as you want without worrying about the configurations.
> To run a chosen container from the list below, run `docker-compose up -d {container-name}`.
> The container name `{container-name}` is the same as its folder name. Example to run the "PHP FPM" container use the name "php-fpm".
- **Web Servers:**
- NGINX
- Apache2
- Caddy
- **Load Balancers:**
- HAProxy
- Traefik
- **PHP Compilers:**
- PHP FPM
- HHVM
- **Database Management Systems:**
- MySQL
- PostgreSQL
- PostGIS
- MariaDB
- Percona
- MSSQL
- MongoDB
- MongoDB Web UI
- Neo4j
- CouchDB
- RethinkDB
- Cassandra
- **Database Management Apps:**
- PhpMyAdmin
- Adminer
- PgAdmin
- **Cache Engines:**
- Redis
- Redis Web UI
- Redis Cluster
- Memcached
- Aerospike
- Varnish
- **Message Brokers:**
- RabbitMQ
- RabbitMQ Admin Console
- Beanstalkd
- Beanstalkd Admin Console
- Eclipse Mosquitto
- PHP Worker
- Laravel Horizon
- **Mail Servers:**
- Mailu
- Mailhog
- MailDev
- **Log Management:**
- GrayLog
- **Testing:**
- Selenium
- **Monitoring:**
- Grafana
- NetData
- **Search Engines:**
- ElasticSearch
- Apache Solr
- Manticore Search
- **IDE's**
- ICE Coder
- Theia
- Web IDE
- **Miscellaneous:**
- Workspace *(Laradock container that includes a rich set of pre-configured useful tools)*
- `PHP CLI`
- `Composer`
- `Git`
- `Vim`
- `xDebug`
- `Linuxbrew`
- `Node`
- `V8JS`
- `Gulp`
- `SQLite`
- `Laravel Envoy`
- `Deployer`
- `Yarn`
- `SOAP`
- `Drush`
- `Wordpress CLI`
- Apache ZooKeeper *(Centralized service for distributed systems to a hierarchical key-value store)*
- Kibana *(Visualize your Elasticsearch data and navigate the Elastic Stack)*
- LogStash *(Server-side data processing pipeline that ingests data from a multitude of sources simultaneously)*
- Jenkins *(automation server, that provides plugins to support building, deploying and automating any project)*
- Certbot *(Automatically enable HTTPS on your website)*
- Swoole *(Production-Grade Async programming Framework for PHP)*
- SonarQube *(continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs and more)*
- Gitlab *(A single application for the entire software development lifecycle)*
- PostGIS *(Database extender for PostgreSQL. It adds support for geographic objects allowing location queries to be run in SQL)*
- Blackfire *(Empowers all PHP developers and IT/Ops to continuously verify and improve their app's performance)*
- Laravel Echo *(Bring the power of WebSockets to your Laravel applications)*
- Phalcon *(A PHP web framework based on the modelviewcontroller pattern)*
- Minio *(Cloud storage server released under Apache License v2, compatible with Amazon S3)*
- AWS EB CLI *(CLI that helps you deploy and manage your AWS Elastic Beanstalk applications and environments)*
- Thumbor *(Photo thumbnail service)*
- IPython *(Provides a rich architecture for interactive computing)*
- Jupyter Hub *(Jupyter notebook for multiple users)*
- Portainer *(Build and manage your Docker environments with ease)*
- Docker Registry *(The Docker Registry implementation for storing and distributing Docker images)*
- Docker Web UI *(A browser-based solution for browsing and modifying a private Docker registry)*
You can choose, which tools to install in your workspace container and other containers, from the `.env` file.
> If you modify `docker-compose.yml`, `.env` or any `dockerfile` file, you must re-build your containers, to see those effects in the running instance.
*If you can't find your Software in the list, build it yourself and submit it. Contributions are welcomed :)*
---
<a name="what-is-docker"></a>
## What is Docker?
[Docker](https://www.docker.com) is an open platform for developing, shipping, and running applications.
Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
With Docker, you can manage your infrastructure in the same ways you manage your applications.
By taking advantage of Dockers methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.
<a name="why-docker-not-vagrant"></a>
## Why Docker not Vagrant!?
[Vagrant](https://www.vagrantup.com) creates Virtual Machines in minutes while Docker creates Virtual Containers in seconds.
Instead of providing a full Virtual Machines, like you get with Vagrant, Docker provides you **lightweight** Virtual Containers, that share the same kernel and allow to safely execute independent processes.
In addition to the speed, Docker gives tons of features that cannot be achieved with Vagrant.
Most importantly Docker can run on Development and on Production (same environment everywhere). While Vagrant is designed for Development only, (so you have to re-provision your server on Production every time).
<a name="Demo"></a>
## Demo Video
What's better than a **Demo Video**:
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
- Laradock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
<a name="Chat"></a>
## Chat with us
You are welcome to join our chat room on Gitter.
[![Gitter](https://badges.gitter.im/Laradock/laradock.svg)](https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
## Awesome People
Laradock exists thanks to all the people who contribute.
### Project Maintainers
<table>
<tbody>
<tr>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/mahmoudz.png?s=150">
<br>
<strong>Mahmoud Zalt</strong>
<br>
<a href="https://github.com/Mahmoudz">@mahmoudz</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/appleboy.png?s=150">
<br>
<strong>Bo-Yi Wu</strong>
<br>
<a href="https://github.com/Mahmoudz">@appleboy</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/philtrep.png?s=150">
<br>
<strong>Philippe Trépanier</strong>
<br>
<a href="https://github.com/Mahmoudz">@philtrep</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/mikeerickson.png?s=150">
<br>
<strong>Mike Erickson</strong>
<br>
<a href="https://github.com/Mahmoudz">@mikeerickson</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/zeroc0d3.png?s=150">
<br>
<strong>Dwi Fahni Denni</strong>
<br>
<a href="https://github.com/Mahmoudz">@zeroc0d3</a>
</td>
</tr>
<tr>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/thorerik.png?s=150">
<br>
<strong>Thor Erik</strong>
<br>
<a href="https://github.com/Mahmoudz">@thorerik</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/winfried-van-loon.png?s=150">
<br>
<strong>Winfried van Loon</strong>
<br>
<a href="https://github.com/Mahmoudz">@winfried-van-loon</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/sixlive.png?s=150">
<br>
<strong>TJ Miller</strong>
<br>
<a href="https://github.com/Mahmoudz">@sixlive</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/bestlong.png?s=150">
<br>
<strong>Yu-Lung Shao (Allen)</strong>
<br>
<a href="https://github.com/Mahmoudz">@bestlong</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/urukalo.png?s=150">
<br>
<strong>Milan Urukalo</strong>
<br>
<a href="https://github.com/Mahmoudz">@urukalo</a>
</td>
</tr>
<tr>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/vwchu.png?s=150">
<br>
<strong>Vince Chu</strong>
<br>
<a href="https://github.com/Mahmoudz">@vwchu</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/zuohuadong.png?s=150">
<br>
<strong>Huadong Zuo</strong>
<br>
<a href="https://github.com/Mahmoudz">@zuohuadong</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/lanphan.png?s=150">
<br>
<strong>Lan Phan</strong>
<br>
<a href="https://github.com/Mahmoudz">@lanphan</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/ahkui.png?s=150">
<br>
<strong>Ahkui</strong>
<br>
<a href="https://github.com/Mahmoudz">@ahkui</a>
</td>
<td align="center" valign="top">
<img width="125" height="125" src="https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/join-us.png">
<br>
<strong>< Join Us ></strong>
<br>
<a href="https://github.com/laradock">@laradock</a>
</td>
</tr>
</tbody>
</table>
### Code Contributors
<a href="https://github.com/undefined/undefined/graphs/contributors"><img src="https://opencollective.com/laradock/contributors.svg?width=890&button=false" /></a>
---
<a name="Donations"></a>
## Financial Contributors
Contribute and help us sustain the project.
<b>Option 1:</b> Donate directly to [Paypal](https://paypal.me/mzmmzz).
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/mzmmzz)
<b>Option 2:</b> Support us via [BeerPay](https://beerpay.io/laradock/laradock).
[![Beerpay](https://beerpay.io/laradock/laradock/badge.svg?style=flat)](https://beerpay.io/laradock/laradock)
<b>Option 3:</b> Become a backer on [Open Collective](https://opencollective.com/laradock/contribute).
<a href="https://opencollective.com/laradock"><img src="https://opencollective.com/laradock/backer.svg?width=890"></a>