2017-02-23 05:08:54 +01:00
<!DOCTYPE html>
< html class = "no-js" >
< head lang = "en-us" >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1" >
< meta http-equiv = "X-UA-Compatible" content = "IE=10" / >
2017-03-10 19:48:13 +01:00
< title > Introduction - Laradock< / title >
2017-04-09 20:39:25 +02:00
< meta name = "generator" content = "Hugo 0.19" / >
2017-02-23 05:08:54 +01:00
< meta name = "description" content = "Laradock documentations." >
< link rel = "canonical" href = "http://laradock.io/introduction/" >
< meta name = "author" content = "Mahmoud Zalt" >
< meta property = "og:url" content = "http://laradock.io/introduction/" >
2017-03-10 19:48:13 +01:00
< meta property = "og:title" content = "Laradock" >
2017-04-14 23:58:10 +02:00
< meta property = "og:image" content = "http://laradock.io/images/logo.png" >
2017-03-10 19:48:13 +01:00
< meta name = "apple-mobile-web-app-title" content = "Laradock" >
2017-02-23 05:08:54 +01:00
< meta name = "apple-mobile-web-app-capable" content = "yes" >
< meta name = "apple-mobile-web-app-status-bar-style" content = "black-translucent" >
< link rel = "shortcut icon" type = "image/x-icon" href = "http://laradock.io/images/favicon.ico" >
< link rel = "icon" type = "image/x-icon" href = "http://laradock.io/images/favicon.ico" >
< style >
@font-face {
font-family: 'Icon';
src: url('http://laradock.io/fonts/icon.eot');
src: url('http://laradock.io/fonts/icon.eot')
format('embedded-opentype'),
url('http://laradock.io/fonts/icon.woff')
format('woff'),
url('http://laradock.io/fonts/icon.ttf')
format('truetype'),
url('http://laradock.io/fonts/icon.svg')
format('svg');
font-weight: normal;
font-style: normal;
}
< / style >
< link rel = "stylesheet" href = "http://laradock.io/stylesheets/application.css" >
< link rel = "stylesheet" href = "http://laradock.io/stylesheets/temporary.css" >
< link rel = "stylesheet" href = "http://laradock.io/stylesheets/palettes.css" >
< link rel = "stylesheet" href = "http://laradock.io/stylesheets/highlight/highlight.css" >
< link rel = "stylesheet" href = "//fonts.googleapis.com/css?family=Doctarine:400,700|Source+Code+Pro" >
< style >
body, input {
font-family: 'Doctarine', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: 'Source Code Pro', 'Courier New', 'Courier', monospace;
}
< / style >
< script src = "http://laradock.io/javascripts/modernizr.js" > < / script >
< / head >
2017-03-10 19:48:13 +01:00
< body class = "palette-primary-deep-purple palette-accent-purple" >
2017-02-23 05:08:54 +01:00
< div class = "backdrop" >
< div class = "backdrop-paper" > < / div >
< / div >
< input class = "toggle" type = "checkbox" id = "toggle-drawer" >
< input class = "toggle" type = "checkbox" id = "toggle-search" >
< label class = "toggle-button overlay" for = "toggle-drawer" > < / label >
< header class = "header" >
< nav aria-label = "Header" >
< div class = "bar default" >
< div class = "button button-menu" role = "button" aria-label = "Menu" >
< label class = "toggle-button icon icon-menu" for = "toggle-drawer" >
< span > < / span >
< / label >
< / div >
< div class = "stretch" >
< div class = "title" >
2017-03-10 19:48:13 +01:00
< b > Laradock< / b > < span style = "color: rgba(249, 245, 255, 0.63);" > / Introduction< / span >
2017-02-23 05:08:54 +01:00
< / div >
< / div >
< div class = "button button-github" role = "button" aria-label = "GitHub" >
2017-03-10 19:48:13 +01:00
< a style = "padding: 0px; font-size:40px" href = "https://github.com/laradock/laradock" title = "@laradock/laradock on GitHub" target = "_blank" class = "toggle-button icon icon-github" > < / a >
2017-02-23 05:08:54 +01:00
< / div >
2017-03-10 19:48:13 +01:00
< p style = "font-size: 18px; padding: 8px" > Github< / p >
2017-02-23 05:08:54 +01:00
< / div >
< div class = "bar search" >
< div class = "button button-close" role = "button" aria-label = "Close" >
< label class = "toggle-button icon icon-back" for = "toggle-search" > < / label >
< / div >
< div class = "stretch" >
< div class = "field" >
< input class = "query" type = "text" placeholder = "Search" autocapitalize = "off" autocorrect = "off" autocomplete = "off" spellcheck >
< / div >
< / div >
< div class = "button button-reset" role = "button" aria-label = "Search" >
< button class = "toggle-button icon icon-close" id = "reset-search" > < / button >
< / div >
< / div >
< / nav >
2017-03-10 19:48:13 +01:00
2017-02-23 05:08:54 +01:00
< / header >
< main class = "main" >
< div class = "drawer" >
< nav aria-label = "Navigation" >
2017-04-14 23:46:35 +02:00
< a href = "http://laradock.io/" class = "project" >
< div class = "banner" >
< div class = "logo" >
2017-04-14 23:58:10 +02:00
< img src = "http://laradock.io/images/logo.png" >
2017-04-14 23:46:35 +02:00
< / div >
2017-03-10 19:48:13 +01:00
2017-02-23 05:08:54 +01:00
2017-03-10 19:48:13 +01:00
2017-04-14 23:46:35 +02:00
< / div >
< / a >
2017-02-23 05:08:54 +01:00
< div class = "scrollable" >
< div class = "wrapper" >
< div class = "toc" >
< ul >
< li >
< a class = "current" title = "Introduction" href = "http://laradock.io/introduction/" >
Introduction
< / a >
< ul id = "scrollspy" >
< / ul >
< / li >
< li >
< a title = "Getting Started" href = "http://laradock.io/getting-started/" >
Getting Started
< / a >
< / li >
< li >
< a title = "Documentation" href = "http://laradock.io/documentation/" >
Documentation
< / a >
< / li >
< li >
2017-04-14 10:43:26 +02:00
< a title = "Giudes" href = "http://laradock.io/guides/" >
Giudes
< / a >
< / li >
< li >
2017-04-14 10:44:50 +02:00
< a title = "Help & Questions" href = "http://laradock.io/help/" >
2017-02-23 05:08:54 +01:00
2017-04-14 10:44:50 +02:00
Help & Questions
2017-02-23 05:08:54 +01:00
< / a >
< / li >
< li >
2017-04-14 10:44:50 +02:00
< a title = "Related Projects" href = "http://laradock.io/related-projects/" >
2017-02-23 05:08:54 +01:00
2017-04-14 10:44:50 +02:00
Related Projects
2017-02-23 05:08:54 +01:00
< / a >
< / li >
< li >
< a title = "Contributing" href = "http://laradock.io/contributing/" >
Contributing
< / a >
< / li >
< li >
< a title = "License" href = "http://laradock.io/license/" >
License
< / a >
< / li >
< / ul >
2017-03-10 19:48:13 +01:00
2017-02-23 05:08:54 +01:00
< ul >
2017-03-10 19:48:13 +01:00
2017-02-23 05:08:54 +01:00
< / ul >
< / div >
< / div >
< / div >
< / nav >
< / div >
< article class = "article" >
< div class = "wrapper" >
< h1 > Introduction < / h1 >
2017-04-14 23:46:35 +02:00
< p > A full PHP development environment for Docker.< / p >
2017-02-23 05:08:54 +01:00
2017-04-14 23:46:35 +02:00
< p > Includes pre-packaged Docker Images, all pre-configured to provide a wonderful PHP development environment.< / p >
2017-02-23 05:08:54 +01:00
2017-04-14 23:46:35 +02:00
< p > Laradock is well known in the Laravel community, as the project started with single focus on running Laravel projects on Docker. Later and due to the large adoption from the PHP community, it started supporting other PHP projects like Symfony, CodeIgniter, WordPress, Drupal… < / p >
< p > < img src = "https://s19.postimg.org/jblfytw9f/laradock-logo.jpg" alt = "" / > < / p >
2017-02-23 05:08:54 +01:00
< h2 id = "quick-overview" > Quick Overview< / h2 >
2017-04-14 23:46:35 +02:00
< p > Let’ s see how easy it is to install < code > NGINX< / code > , < code > PHP< / code > , < code > Composer< / code > , < code > MySQL< / code > , < code > Redis< / code > and < code > Beanstalkd< / code > :< / p >
2017-02-23 05:08:54 +01:00
2017-03-16 22:03:05 +01:00
< p > 1 - Clone Laradock inside your PHP project:< / p >
2017-02-23 05:08:54 +01:00
< pre > < code class = "language-shell" > git clone https://github.com/Laradock/laradock.git
< / code > < / pre >
2017-03-16 22:03:05 +01:00
< p > 2 - Enter the laradock folder and rename < code > env-example< / code > to < code > .env< / code > .< / p >
< pre > < code class = "language-shell" > cp env-example .env
< / code > < / pre >
< p > 3 - Run your containers:< / p >
2017-02-23 05:08:54 +01:00
< pre > < code class = "language-shell" > docker-compose up -d nginx mysql redis beanstalkd
< / code > < / pre >
2017-03-16 22:03:05 +01:00
< p > 3 - Open your project’ s < code > .env< / code > file and set the following:< / p >
2017-02-23 05:08:54 +01:00
< pre > < code class = "language-shell" > DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd
< / code > < / pre >
< p > 4 - Open your browser and visit localhost: < code > http://localhost< / code > .< / p >
< pre > < code class = "language-shell" > That's it! enjoy :)
< / code > < / pre >
< p > < a name = "features" > < / a > < / p >
< h2 id = "features" > Features< / h2 >
< ul >
< li > Easy switch between PHP versions: 7.0, 5.6, 5.5… < / li >
< li > Choose your favorite database engine: MySQL, Postgres, MariaDB… < / li >
< li > Run your own combination of software: Memcached, HHVM, Beanstalkd… < / li >
< li > Every software runs on a separate container: PHP-FPM, NGINX, PHP-CLI… < / li >
< li > Easy to customize any container, with simple edit to the < code > Dockerfile< / code > .< / li >
< li > All Images extends from an official base Image. (Trusted base Images).< / li >
< li > Pre-configured NGINX for Laravel.< / li >
< li > Easy to apply configurations inside containers.< / li >
< li > Clean and well structured Dockerfiles (< code > Dockerfile< / code > ).< / li >
< li > Latest version of the Docker Compose file (< code > docker-compose< / code > ).< / li >
< li > Everything is visible and editable.< / li >
< li > Fast Images Builds.< / li >
< li > More to come every week..< / li >
< / ul >
< p > < a name = "Supported-Containers" > < / a > < / p >
2017-04-14 23:46:35 +02:00
< h2 id = "supported-software-images" > Supported Software (Images)< / h2 >
2017-02-23 05:08:54 +01:00
2017-04-14 23:46:35 +02:00
< p > In adhering to the separation of concerns principle as promoted by Docker, Laradock runs each software on its own Container.
You can turn On/Off as many instances of as any container without worrying about the configurations, everything works like a charm.< / p >
2017-02-23 05:08:54 +01:00
< ul >
2017-04-14 23:46:35 +02:00
< li > < strong > Database Engines:< / strong >
MySQL - MariaDB - MongoDB - Neo4j - RethinkDB - PostgreSQL - Postgres Postgis.< / li >
2017-02-23 05:08:54 +01:00
< li > < strong > Cache Engines:< / strong >
2017-04-14 23:46:35 +02:00
Redis - Memcached - Aerospike< / li >
2017-02-23 05:08:54 +01:00
< li > < strong > PHP Servers:< / strong >
2017-04-14 23:46:35 +02:00
NGINX - Apache2 - Caddy< / li >
2017-02-23 05:08:54 +01:00
< li > < strong > PHP Compilers:< / strong >
2017-04-14 23:46:35 +02:00
PHP FPM - HHVM< / li >
< li > < strong > Message Queuing:< / strong >
Beanstalkd - Beanstalkd Console - RabbitMQ - RabbitMQ Console< / li >
2017-02-23 05:08:54 +01:00
< li > < strong > Tools:< / strong >
2017-04-14 23:46:35 +02:00
PhpMyAdmin - Adminer - PgAdmin - ElasticSearch - Selenium - Certbot - Mailhog - Minio… < / li >
< / ul >
2017-02-23 05:08:54 +01:00
2017-04-14 23:46:35 +02:00
< p > Laradock introduces the < strong > Workspace< / strong > Image, as a development environment.
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.< / p >
2017-02-23 05:08:54 +01:00
2017-04-14 23:46:35 +02:00
< p > < strong > Workspace Image Tools< / strong >
PHP CLI - Composer - Git - Linuxbrew - Node - Gulp - SQLite - xDebug - Envoy - Deployer - Vim - Yarn… < / p >
< p > You can choose, which tools to install in your workspace container and other containers, from the < code > .env< / code > file.< / p >
2017-02-23 05:08:54 +01:00
< blockquote >
2017-04-14 23:46:35 +02:00
< p > If you modify < code > docker-compose.yml< / code > , < code > .env< / code > or any < code > dockerfile< / code > file, you must re-build your containers, to see those effects in the running instance.< / p >
2017-02-23 05:08:54 +01:00
< / blockquote >
2017-04-14 23:46:35 +02:00
< p > If you can’ t find your Software in the list, build it yourself and sumit it. Contributions are welcomed :)< / p >
< p > < a name = "what-is-docker" > < / a > < / p >
< h2 id = "what-is-docker" > What is Docker?< / h2 >
< p > < a href = "https://www.docker.com" > Docker< / a > is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of < a href = "https://en.wikipedia.org/wiki/Operating-system-level_virtualization" > operating-system-level virtualization< / a > on Linux, Mac OS and Windows.< / p >
< p > < a name = "why-docker-not-vagrant" > < / a > < / p >
< h2 id = "why-docker-not-vagrant" > Why Docker not Vagrant!?< / h2 >
< p > < a href = "https://www.vagrantup.com" > Vagrant< / a > creates Virtual Machines in minutes while Docker creates Virtual Containers in seconds.< / p >
< p > Instead of providing a full Virtual Machines, like you get with Vagrant, Docker provides you < strong > lightweight< / strong > Virtual Containers, that share the same kernel and allow to safely execute independent processes.< / p >
< p > In addition to the speed, Docker gives tons of features that cannot be achieved with Vagrant.< / p >
< p > 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).< / p >
< p > < a name = "Demo" > < / a > < / p >
< h2 id = "demo-video" > Demo Video< / h2 >
< p > What’ s better than a < strong > Demo Video< / strong > :< / p >
< ul >
< li > Laradock v5.* (soon or never)< / li >
< li > Laradock < a href = "https://www.youtube.com/watch?v=TQii1jDa96Y" > v4.*< / a > < / li >
< li > Laradock < a href = "https://www.youtube.com/watch?v=-DamFMczwDA" > v2.*< / a > < / li >
< li > Laradock < a href = "https://www.youtube.com/watch?v=jGkyO6Is_aI" > v0.3< / a > < / li >
< li > Laradock < a href = "https://www.youtube.com/watch?v=3YQsHe6oF80" > v0.1< / a > < / li >
< / ul >
2017-02-23 05:08:54 +01:00
< p > < a name = "Chat" > < / a > < / p >
< h2 id = "chat-with-us" > Chat with us< / h2 >
< p > You are welcome to join our chat room on Gitter.< / p >
2017-03-16 22:03:05 +01:00
< p > < a href = "https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge" > < img src = "https://badges.gitter.im/Laradock/laradock.svg" alt = "Gitter" / > < / a > < / p >
2017-02-23 05:08:54 +01:00
< aside class = "copyright" role = "note" >
Documentation built with
< a href = "https://www.gohugo.io" target = "_blank" > Hugo< / a >
using the
< a href = "http://github.com/digitalcraftsman/hugo-material-docs" target = "_blank" > Material< / a > theme.
< / aside >
< footer class = "footer" >
< nav class = "pagination" aria-label = "Footer" >
< div class = "previous" >
< / div >
< div class = "next" >
< a href = "http://laradock.io/getting-started/" title = "Getting Started" >
< span class = "direction" >
Next
< / span >
< div class = "page" >
< div class = "stretch" >
< div class = "title" >
Getting Started
< / div >
< / div >
< div class = "button button-next" role = "button" aria-label = "Next" >
< i class = "icon icon-forward" > < / i >
< / div >
< / div >
< / a >
< / div >
< / nav >
< / footer >
< / div >
< / article >
< div class = "results" role = "status" aria-live = "polite" >
< div class = "scrollable" >
< div class = "wrapper" >
< div class = "meta" > < / div >
< div class = "list" > < / div >
< / div >
< / div >
< / div >
< / main >
< script >
2017-03-10 19:48:13 +01:00
var base_url = '';
var repo_id = '';
2017-02-23 05:08:54 +01:00
< / script >
< script src = "http://laradock.io/javascripts/application.js" > < / script >
< script >
/* Add headers to scrollspy */
var headers = document.getElementsByTagName("h2");
var scrollspy = document.getElementById('scrollspy');
if(scrollspy) {
if(headers.length > 0) {
for(var i = 0; i < headers.length ; i + + ) {
var li = document.createElement("li");
li.setAttribute("class", "anchor");
var a = document.createElement("a");
a.setAttribute("href", "#" + headers[i].id);
a.setAttribute("title", headers[i].innerHTML);
a.innerHTML = headers[i].innerHTML;
li.appendChild(a)
scrollspy.appendChild(li);
}
} else {
scrollspy.parentElement.removeChild(scrollspy)
}
/* Add permanent link next to the headers */
var headers = document.querySelectorAll("h1, h2, h3, h4, h5, h6");
for(var i = 0; i < headers.length ; i + + ) {
var a = document.createElement("a");
a.setAttribute("class", "headerlink");
a.setAttribute("href", "#" + headers[i].id);
a.setAttribute("title", "Permanent link")
a.innerHTML = "#";
headers[i].appendChild(a);
}
}
< / script >
< script >
(function(i,s,o,g,r,a,m){
i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
m.parentNode.insertBefore(a,m)
})(window, document,
'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-37514928-9', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
var buttons = document.querySelectorAll('a');
Array.prototype.map.call(buttons, function(item) {
if (item.host != document.location.host) {
item.addEventListener('click', function() {
var action = item.getAttribute('data-action') || 'follow';
ga('send', 'event', 'outbound', action, item.href);
});
}
});
var query = document.querySelector('.query');
query.addEventListener('blur', function() {
if (this.value) {
var path = document.location.pathname;
ga('send', 'pageview', path + '?q=' + this.value);
}
});
< / script >
< script src = "//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js" > < / script >
< script > hljs . initHighlightingOnLoad ( ) ; < / script >
< / body >
< / html >