index.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. <!DOCTYPE html>
  2. <html class="no-js">
  3. <head lang="en-us">
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
  6. <meta http-equiv="X-UA-Compatible" content="IE=10" />
  7. <title>Introduction - Laradock</title>
  8. <meta name="generator" content="Hugo 0.19" />
  9. <meta name="description" content="Laradock documentations.">
  10. <link rel="canonical" href="http://laradock.io/introduction/">
  11. <meta name="author" content="Mahmoud Zalt">
  12. <meta property="og:url" content="http://laradock.io/introduction/">
  13. <meta property="og:title" content="Laradock">
  14. <meta name="apple-mobile-web-app-title" content="Laradock">
  15. <meta name="apple-mobile-web-app-capable" content="yes">
  16. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  17. <link rel="shortcut icon" type="image/x-icon" href="http://laradock.io/images/favicon.ico">
  18. <link rel="icon" type="image/x-icon" href="http://laradock.io/images/favicon.ico">
  19. <style>
  20. @font-face {
  21. font-family: 'Icon';
  22. src: url('http://laradock.io/fonts/icon.eot');
  23. src: url('http://laradock.io/fonts/icon.eot')
  24. format('embedded-opentype'),
  25. url('http://laradock.io/fonts/icon.woff')
  26. format('woff'),
  27. url('http://laradock.io/fonts/icon.ttf')
  28. format('truetype'),
  29. url('http://laradock.io/fonts/icon.svg')
  30. format('svg');
  31. font-weight: normal;
  32. font-style: normal;
  33. }
  34. </style>
  35. <link rel="stylesheet" href="http://laradock.io/stylesheets/application.css">
  36. <link rel="stylesheet" href="http://laradock.io/stylesheets/temporary.css">
  37. <link rel="stylesheet" href="http://laradock.io/stylesheets/palettes.css">
  38. <link rel="stylesheet" href="http://laradock.io/stylesheets/highlight/highlight.css">
  39. <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Doctarine:400,700|Source&#43;Code&#43;Pro">
  40. <style>
  41. body, input {
  42. font-family: 'Doctarine', Helvetica, Arial, sans-serif;
  43. }
  44. pre, code {
  45. font-family: 'Source Code Pro', 'Courier New', 'Courier', monospace;
  46. }
  47. </style>
  48. <script src="http://laradock.io/javascripts/modernizr.js"></script>
  49. </head>
  50. <body class="palette-primary-deep-purple palette-accent-purple">
  51. <div class="backdrop">
  52. <div class="backdrop-paper"></div>
  53. </div>
  54. <input class="toggle" type="checkbox" id="toggle-drawer">
  55. <input class="toggle" type="checkbox" id="toggle-search">
  56. <label class="toggle-button overlay" for="toggle-drawer"></label>
  57. <header class="header">
  58. <nav aria-label="Header">
  59. <div class="bar default">
  60. <div class="button button-menu" role="button" aria-label="Menu">
  61. <label class="toggle-button icon icon-menu" for="toggle-drawer">
  62. <span></span>
  63. </label>
  64. </div>
  65. <div class="stretch">
  66. <div class="title">
  67. <b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Introduction</span>
  68. </div>
  69. </div>
  70. <div class="button button-github" role="button" aria-label="GitHub">
  71. <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>
  72. </div>
  73. <p style="font-size: 18px; padding: 8px">Github</p>
  74. </div>
  75. <div class="bar search">
  76. <div class="button button-close" role="button" aria-label="Close">
  77. <label class="toggle-button icon icon-back" for="toggle-search"></label>
  78. </div>
  79. <div class="stretch">
  80. <div class="field">
  81. <input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
  82. </div>
  83. </div>
  84. <div class="button button-reset" role="button" aria-label="Search">
  85. <button class="toggle-button icon icon-close" id="reset-search"></button>
  86. </div>
  87. </div>
  88. </nav>
  89. </header>
  90. <main class="main">
  91. <div class="drawer">
  92. <nav aria-label="Navigation">
  93. <div class="scrollable">
  94. <div class="wrapper">
  95. <div class="toc">
  96. <ul>
  97. <li>
  98. <a class="current" title="Introduction" href="http://laradock.io/introduction/">
  99. Introduction
  100. </a>
  101. <ul id="scrollspy">
  102. </ul>
  103. </li>
  104. <li>
  105. <a title="Getting Started" href="http://laradock.io/getting-started/">
  106. Getting Started
  107. </a>
  108. </li>
  109. <li>
  110. <a title="Documentation" href="http://laradock.io/documentation/">
  111. Documentation
  112. </a>
  113. </li>
  114. <li>
  115. <a title="Related Projects" href="http://laradock.io/related-projects/">
  116. Related Projects
  117. </a>
  118. </li>
  119. <li>
  120. <a title="Help &amp; Questions" href="http://laradock.io/help/">
  121. Help &amp; Questions
  122. </a>
  123. </li>
  124. <li>
  125. <a title="Contributing" href="http://laradock.io/contributing/">
  126. Contributing
  127. </a>
  128. </li>
  129. <li>
  130. <a title="License" href="http://laradock.io/license/">
  131. License
  132. </a>
  133. </li>
  134. </ul>
  135. <ul>
  136. </ul>
  137. </div>
  138. </div>
  139. </div>
  140. </nav>
  141. </div>
  142. <article class="article">
  143. <div class="wrapper">
  144. <h1>Introduction </h1>
  145. <p>Laradock strives to make the PHP development experience easier and faster.</p>
  146. <p>It contains pre-packaged Docker Images that provides you a wonderful <em>development</em> environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.</p>
  147. <p>Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal&hellip;).</p>
  148. <h2 id="quick-overview">Quick Overview</h2>
  149. <p>Let&rsquo;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>
  150. <p>1 - Clone Laradock inside your PHP project:</p>
  151. <pre><code class="language-shell">git clone https://github.com/Laradock/laradock.git
  152. </code></pre>
  153. <p>2 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code>.</p>
  154. <pre><code class="language-shell">cp env-example .env
  155. </code></pre>
  156. <p>3 - Run your containers:</p>
  157. <pre><code class="language-shell">docker-compose up -d nginx mysql redis beanstalkd
  158. </code></pre>
  159. <p>3 - Open your project&rsquo;s <code>.env</code> file and set the following:</p>
  160. <pre><code class="language-shell">DB_HOST=mysql
  161. REDIS_HOST=redis
  162. QUEUE_HOST=beanstalkd
  163. </code></pre>
  164. <p>4 - Open your browser and visit localhost: <code>http://localhost</code>.</p>
  165. <pre><code class="language-shell">That's it! enjoy :)
  166. </code></pre>
  167. <p><a name="what-is-docker"></a></p>
  168. <h2 id="what-is-docker">What is Docker?</h2>
  169. <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>
  170. <p><a name="why-docker-not-vagrant"></a></p>
  171. <h2 id="why-docker-not-vagrant">Why Docker not Vagrant!?</h2>
  172. <p><a href="https://www.vagrantup.com">Vagrant</a> creates Virtual Machines in minutes while Docker creates Virtual Containers in seconds.</p>
  173. <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>
  174. <p>In addition to the speed, Docker gives tons of features that cannot be achieved with Vagrant.</p>
  175. <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>
  176. <p><a name="laradock-vs-homestead"></a></p>
  177. <h2 id="laradock-vs-homestead-for-laravel-developers">Laradock VS Homestead (For Laravel Developers)</h2>
  178. <blockquote>
  179. <p>Laradock It&rsquo;s like Laravel Homestead but for Docker instead of Vagrant.</p>
  180. </blockquote>
  181. <p>Laradock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
  182. <ul>
  183. <li><p>Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.</p></li>
  184. <li><p>Laradock is a tool that controls Docker for you (using Docker &amp; Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
  185. </ul>
  186. <p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>Laradock is much faster than Homestead</strong>.</p>
  187. <p><a name="Demo"></a></p>
  188. <h2 id="demo-video">Demo Video</h2>
  189. <p>What&rsquo;s better than a <strong>Demo Video</strong>:</p>
  190. <ul>
  191. <li>Laradock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
  192. <li>Laradock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
  193. <li>Laradock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
  194. <li>Laradock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
  195. </ul>
  196. <p><a name="features"></a></p>
  197. <h2 id="features">Features</h2>
  198. <ul>
  199. <li>Easy switch between PHP versions: 7.0, 5.6, 5.5&hellip;</li>
  200. <li>Choose your favorite database engine: MySQL, Postgres, MariaDB&hellip;</li>
  201. <li>Run your own combination of software: Memcached, HHVM, Beanstalkd&hellip;</li>
  202. <li>Every software runs on a separate container: PHP-FPM, NGINX, PHP-CLI&hellip;</li>
  203. <li>Easy to customize any container, with simple edit to the <code>Dockerfile</code>.</li>
  204. <li>All Images extends from an official base Image. (Trusted base Images).</li>
  205. <li>Pre-configured NGINX for Laravel.</li>
  206. <li>Easy to apply configurations inside containers.</li>
  207. <li>Clean and well structured Dockerfiles (<code>Dockerfile</code>).</li>
  208. <li>Latest version of the Docker Compose file (<code>docker-compose</code>).</li>
  209. <li>Everything is visible and editable.</li>
  210. <li>Fast Images Builds.</li>
  211. <li>More to come every week..</li>
  212. </ul>
  213. <p><a name="Supported-Containers"></a></p>
  214. <h2 id="supported-software-containers">Supported Software (Containers)</h2>
  215. <ul>
  216. <li><strong>Database Engines:</strong>
  217. <ul>
  218. <li>MySQL</li>
  219. <li>MariaDB</li>
  220. <li>MongoDB</li>
  221. <li>Neo4j</li>
  222. <li>RethinkDB</li>
  223. <li>PostgreSQL</li>
  224. <li>Postgres Postgis</li>
  225. </ul></li>
  226. <li><strong>Cache Engines:</strong>
  227. <ul>
  228. <li>Redis</li>
  229. <li>Memcached</li>
  230. <li>Aerospike</li>
  231. </ul></li>
  232. <li><strong>PHP Servers:</strong>
  233. <ul>
  234. <li>NGINX</li>
  235. <li>Apache2</li>
  236. <li>Caddy</li>
  237. </ul></li>
  238. <li><strong>PHP Compilers:</strong>
  239. <ul>
  240. <li>PHP-FPM</li>
  241. <li>HHVM</li>
  242. </ul></li>
  243. <li><strong>Message Queuing Systems:</strong>
  244. <ul>
  245. <li>Beanstalkd</li>
  246. <li>Beanstalkd Console</li>
  247. <li>RabbitMQ</li>
  248. <li>RabbitMQ Console</li>
  249. </ul></li>
  250. <li><strong>Tools:</strong>
  251. <ul>
  252. <li>PhpMyAdmin</li>
  253. <li>Adminer</li>
  254. <li>PgAdmin</li>
  255. <li>ElasticSearch</li>
  256. <li>Selenium</li>
  257. <li>Certbot</li>
  258. <li>Mailhog</li>
  259. <li>Minio</li>
  260. <li>Workspace
  261. <ul>
  262. <li>PHP7-CLI</li>
  263. <li>Composer</li>
  264. <li>Git</li>
  265. <li>Linuxbrew</li>
  266. <li>Node</li>
  267. <li>Gulp</li>
  268. <li>SQLite</li>
  269. <li>xDebug</li>
  270. <li>Envoy</li>
  271. <li>Deployer</li>
  272. <li>Vim</li>
  273. <li>Yarn</li>
  274. <li>&hellip; Many other supported tools are not documented. (Will be updated soon)</li>
  275. </ul></li>
  276. </ul></li>
  277. </ul>
  278. <blockquote>
  279. <p>If you can&rsquo;t find your Software, build it yourself and add it to this list. Contributions are welcomed :)</p>
  280. </blockquote>
  281. <p><a name="Chat"></a></p>
  282. <h2 id="chat-with-us">Chat with us</h2>
  283. <p>You are welcome to join our chat room on Gitter.</p>
  284. <p><a href="https://gitter.im/Laradock/laradock?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/Laradock/laradock.svg" alt="Gitter" /></a></p>
  285. <aside class="copyright" role="note">
  286. Documentation built with
  287. <a href="https://www.gohugo.io" target="_blank">Hugo</a>
  288. using the
  289. <a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme.
  290. </aside>
  291. <footer class="footer">
  292. <nav class="pagination" aria-label="Footer">
  293. <div class="previous">
  294. </div>
  295. <div class="next">
  296. <a href="http://laradock.io/getting-started/" title="Getting Started">
  297. <span class="direction">
  298. Next
  299. </span>
  300. <div class="page">
  301. <div class="stretch">
  302. <div class="title">
  303. Getting Started
  304. </div>
  305. </div>
  306. <div class="button button-next" role="button" aria-label="Next">
  307. <i class="icon icon-forward"></i>
  308. </div>
  309. </div>
  310. </a>
  311. </div>
  312. </nav>
  313. </footer>
  314. </div>
  315. </article>
  316. <div class="results" role="status" aria-live="polite">
  317. <div class="scrollable">
  318. <div class="wrapper">
  319. <div class="meta"></div>
  320. <div class="list"></div>
  321. </div>
  322. </div>
  323. </div>
  324. </main>
  325. <script>
  326. var base_url = '';
  327. var repo_id = '';
  328. </script>
  329. <script src="http://laradock.io/javascripts/application.js"></script>
  330. <script>
  331. /* Add headers to scrollspy */
  332. var headers = document.getElementsByTagName("h2");
  333. var scrollspy = document.getElementById('scrollspy');
  334. if(scrollspy) {
  335. if(headers.length > 0) {
  336. for(var i = 0; i < headers.length; i++) {
  337. var li = document.createElement("li");
  338. li.setAttribute("class", "anchor");
  339. var a = document.createElement("a");
  340. a.setAttribute("href", "#" + headers[i].id);
  341. a.setAttribute("title", headers[i].innerHTML);
  342. a.innerHTML = headers[i].innerHTML;
  343. li.appendChild(a)
  344. scrollspy.appendChild(li);
  345. }
  346. } else {
  347. scrollspy.parentElement.removeChild(scrollspy)
  348. }
  349. /* Add permanent link next to the headers */
  350. var headers = document.querySelectorAll("h1, h2, h3, h4, h5, h6");
  351. for(var i = 0; i < headers.length; i++) {
  352. var a = document.createElement("a");
  353. a.setAttribute("class", "headerlink");
  354. a.setAttribute("href", "#" + headers[i].id);
  355. a.setAttribute("title", "Permanent link")
  356. a.innerHTML = "#";
  357. headers[i].appendChild(a);
  358. }
  359. }
  360. </script>
  361. <script>
  362. (function(i,s,o,g,r,a,m){
  363. i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
  364. []).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  365. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
  366. m.parentNode.insertBefore(a,m)
  367. })(window, document,
  368. 'script', '//www.google-analytics.com/analytics.js', 'ga');
  369. ga('create', 'UA-37514928-9', 'auto');
  370. ga('set', 'anonymizeIp', true);
  371. ga('send', 'pageview');
  372. var buttons = document.querySelectorAll('a');
  373. Array.prototype.map.call(buttons, function(item) {
  374. if (item.host != document.location.host) {
  375. item.addEventListener('click', function() {
  376. var action = item.getAttribute('data-action') || 'follow';
  377. ga('send', 'event', 'outbound', action, item.href);
  378. });
  379. }
  380. });
  381. var query = document.querySelector('.query');
  382. query.addEventListener('blur', function() {
  383. if (this.value) {
  384. var path = document.location.pathname;
  385. ga('send', 'pageview', path + '?q=' + this.value);
  386. }
  387. });
  388. </script>
  389. <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script>
  390. <script>hljs.initHighlightingOnLoad();</script>
  391. </body>
  392. </html>