2017-02-23 12:08:54 +08:00
---
2019-07-16 00:59:43 +08:00
title: 1. Introduction
2017-02-23 12:08:54 +08:00
type: index
weight: 1
---
2019-07-24 04:45:05 +08:00
## Use Docker First - Then Learn About It Later
2017-02-23 12:08:54 +08:00
2019-07-24 04:45:05 +08:00
Laradock is a PHP development environment that runs on Docker.
2017-02-23 12:08:54 +08:00
2019-07-16 00:59:43 +08:00
Supports a variety of useful Docker Images, pre-configured to provide a wonderful PHP development environment.
2017-02-23 12:08:54 +08:00
2017-04-15 05:46:35 +08:00
2019-07-10 03:50:05 +08:00
![](https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/laradock-logo.jpg)
2017-04-15 05:46:35 +08:00
2019-07-10 03:50:05 +08:00
< a name = "sponsors" > < / a >
## Sponsors
2019-08-13 03:46:34 +08:00
< p align = "center" >
<!-- Golden Sponsors -->
< a href = "https://edubirdie.com/?ref=Laradock" target = "_blank" >
< img src = "https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/sponsor-1.png?raw=true" width = "300px" alt = "Writing essays service Edubirdie" / >
< / a >
< / p >
< br >
<!-- OpenCollective Sponsors -->
2019-07-10 03:50:05 +08:00
< a href = "https://opencollective.com/laradock/sponsor/0/website" target = "_blank" > < img src = "https://opencollective.com/laradock/sponsor/0/avatar.svg" > < / a >
< a href = "https://opencollective.com/laradock/sponsor/1/website" target = "_blank" > < img src = "https://opencollective.com/laradock/sponsor/1/avatar.svg" > < / a >
< a href = "https://opencollective.com/laradock/sponsor/2/website" target = "_blank" > < img src = "https://opencollective.com/laradock/sponsor/2/avatar.svg" > < / a >
< a href = "https://opencollective.com/laradock/sponsor/3/website" target = "_blank" > < img src = "https://opencollective.com/laradock/sponsor/3/avatar.svg" > < / a >
< a href = "https://opencollective.com/laradock/sponsor/4/website" target = "_blank" > < img src = "https://opencollective.com/laradock/sponsor/4/avatar.svg" > < / a >
< a href = "https://opencollective.com/laradock/sponsor/5/website" target = "_blank" > < img src = "https://opencollective.com/laradock/sponsor/5/avatar.svg" > < / a >
< a href = "https://opencollective.com/laradock/sponsor/6/website" target = "_blank" > < img src = "https://opencollective.com/laradock/sponsor/6/avatar.svg" > < / a >
< a href = "https://opencollective.com/laradock/sponsor/7/website" target = "_blank" > < img src = "https://opencollective.com/laradock/sponsor/7/avatar.svg" > < / a >
For basic sponsorships go to [Open Collective ](https://opencollective.com/laradock#sponsor ), for golden sponsorships contact < a href = "mailto: support@laradock.io" > support@laradock.io</ a > .
< br >
2019-08-13 03:46:34 +08:00
*Your logo will show up on the [github repository ](https://github.com/laradock/laradock/ ) index page and the [documentation ](http://laradock.io/ ) main page.*
2017-02-23 12:08:54 +08:00
## Quick Overview
2019-07-16 00:59:43 +08:00
Let's see how easy it is to setup our demo stack `PHP` , `NGINX` , `MySQL` , `Redis` and `Composer` :
2017-02-23 12:08:54 +08:00
2017-03-17 05:03:05 +08:00
1 - Clone Laradock inside your PHP project:
2017-02-23 12:08:54 +08:00
```shell
git clone https://github.com/Laradock/laradock.git
```
2017-03-17 05:03:05 +08:00
2 - Enter the laradock folder and rename `env-example` to `.env` .
```shell
cp env-example .env
```
3 - Run your containers:
2017-02-23 12:08:54 +08:00
```shell
2018-04-05 21:43:22 +08:00
docker-compose up -d nginx mysql phpmyadmin redis workspace
2017-02-23 12:08:54 +08:00
```
2017-04-15 09:02:04 +08:00
4 - Open your project's `.env` file and set the following:
2017-02-23 12:08:54 +08:00
```shell
DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd
```
2017-04-15 09:02:04 +08:00
5 - Open your browser and visit localhost: `http://localhost` .
2017-02-23 12:08:54 +08:00
```shell
That's it! enjoy :)
```
2017-04-15 05:46:35 +08:00
< a name = "features" > < / a >
## Features
2017-02-23 12:08:54 +08:00
2019-03-01 18:24:14 +08:00
- Easy switch between PHP versions: 7.3, 7.2, 7.1, 5.6...
2017-04-15 05:46:35 +08:00
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
2019-07-16 00:59:43 +08:00
- Run your own stack: Memcached, HHVM, RabbitMQ...
- Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI...
2017-04-15 05:46:35 +08:00
- Easy to customize any container, with simple edit to the `Dockerfile` .
- All Images extends from an official base Image. (Trusted base Images).
2017-04-15 09:02:04 +08:00
- 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.
2017-04-15 05:46:35 +08:00
- Clean and well structured Dockerfiles (`Dockerfile`).
- Latest version of the Docker Compose file (`docker-compose`).
- Everything is visible and editable.
- Fast Images Builds.
2017-02-23 12:08:54 +08:00
2017-04-15 05:46:35 +08:00
< a name = "Supported-Containers" > < / a >
2019-07-16 02:47:29 +08:00
## Supported Software (Docker Images)
2017-04-15 05:46:35 +08:00
2019-07-16 00:59:43 +08:00
> Laradock, adheres to the 'separation of concerns' principle, thus it runs each software on its own Docker Container.
2019-07-16 02:47:29 +08:00
> You can turn On/Off as many instances as you want without worrying about the configurations.
2017-02-23 12:08:54 +08:00
2019-07-16 00:59:43 +08:00
> 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".
2017-02-23 12:08:54 +08:00
2019-07-16 00:59:43 +08:00
- **Web Servers:**
2019-07-16 02:47:29 +08:00
- NGINX
- Apache2
- Caddy
- **Load Balancers:**
- HAProxy
- Traefik
2017-02-23 12:08:54 +08:00
2019-07-16 00:59:43 +08:00
- **PHP Compilers:**
2019-07-16 02:47:29 +08:00
- PHP FPM
- HHVM
2019-07-16 00:59:43 +08:00
- **Database Management Systems:**
2019-07-16 02:47:29 +08:00
- MySQL
- PostgreSQL
- PostGIS
- MariaDB
- Percona
- MSSQL
- MongoDB
- MongoDB Web UI
- Neo4j
- CouchDB
- RethinkDB
2019-07-25 16:18:33 +08:00
- Cassandra
2019-07-16 02:47:29 +08:00
2019-07-16 00:59:43 +08:00
- **Database Management Apps:**
2019-07-16 02:47:29 +08:00
- PhpMyAdmin
- Adminer
- PgAdmin
2019-07-16 00:59:43 +08:00
- **Cache Engines:**
2019-07-16 02:47:29 +08:00
- Redis
- Redis Web UI
- Redis Cluster
- Memcached
- Aerospike
- Varnish
2019-07-16 00:59:43 +08:00
- **Message Brokers:**
2019-07-16 02:47:29 +08:00
- RabbitMQ
- RabbitMQ Admin Console
- Beanstalkd
- Beanstalkd Admin Console
- Eclipse Mosquitto
- PHP Worker
- Laravel Horizon
2019-07-16 00:59:43 +08:00
- **Mail Servers:**
2019-07-16 02:47:29 +08:00
- Mailu
- Mailhog
- MailDev
- **Log Management:**
- GrayLog
2019-07-16 00:59:43 +08:00
- **Testing:**
2019-07-16 02:47:29 +08:00
- Selenium
2019-07-16 00:59:43 +08:00
- **Monitoring:**
2019-07-16 02:47:29 +08:00
- Grafana
- NetData
- **Search Engines:**
- ElasticSearch
- Apache Solr
- Manticore Search
- **IDE's**
- ICE Coder
- Theia
- Web IDE
- **Miscellaneous:**
2019-07-24 04:45:05 +08:00
- Workspace *(Laradock container that includes a rich set of pre-configured useful tools)*
2019-07-16 02:47:29 +08:00
- `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 model– view– controller 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)*
2017-02-23 12:08:54 +08:00
2017-04-15 05:46:35 +08:00
You can choose, which tools to install in your workspace container and other containers, from the `.env` file.
2017-02-23 12:08:54 +08:00
2017-04-15 05:46:35 +08:00
> 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.
2017-02-23 12:08:54 +08:00
2019-07-16 02:47:29 +08:00
*If you can't find your Software in the list, build it yourself and submit it. Contributions are welcomed :)*
2017-02-23 12:08:54 +08:00
2017-04-15 05:46:35 +08:00
< a name = "what-is-docker" > < / a >
## What is Docker?
2017-02-23 12:08:54 +08:00
2017-04-23 04:25:25 +08:00
[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 Docker’ s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.
2017-02-23 12:08:54 +08:00
2017-04-15 05:46:35 +08:00
< 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).
2017-02-23 12:08:54 +08:00
< a name = "Demo" > < / a >
## Demo Video
What's better than a **Demo Video** :
2017-03-17 05:03:05 +08:00
- 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 )
2017-02-23 12:08:54 +08:00
< a name = "Chat" > < / a >
## Chat with us
You are welcome to join our chat room on Gitter.
2017-03-17 05:03:05 +08:00
[![Gitter ](https://badges.gitter.im/Laradock/laradock.svg )](https://gitter.im/Laradock/laradock?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge)
2017-11-08 11:16:50 +08:00
< a name = "Donations" > < / a >
## Donations
2017-11-08 15:01:40 +08:00
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
> Thanks in advance.
2019-07-16 00:59:43 +08:00
Donate directly via [Paypal ](https://paypal.me/mzmmzz )
2017-11-08 11:16:50 +08:00
2019-07-16 00:59:43 +08:00
[![Donate ](https://img.shields.io/badge/Donate-PayPal-green.svg )](https://paypal.me/mzmmzz)
2017-11-24 02:41:41 +08:00
2017-11-08 15:01:40 +08:00
or show your support via [Beerpay ](https://beerpay.io/laradock/laradock )
[![Beerpay ](https://beerpay.io/laradock/laradock/badge.svg?style=flat )](https://beerpay.io/laradock/laradock)
2019-07-16 00:59:43 +08:00
or become a backer on [Open Collective ](https://opencollective.com/laradock#backer )
< a href = "https://opencollective.com/laradock#backers" target = "_blank" > < img src = "https://opencollective.com/laradock/backers.svg?width=890" > < / a >