The guides page was showing broken images as the url for those was not taking into consideration the url rewrite. I just added a slash in front of all those urls to serve them from root images folder instead.
Caddy, NGINX and Apache2 should have the same default application paths. The `public/` path suffix is now added in the dotenv file to be able to use Laradock for non-laravel projects as well. Also, updated the documentation.
* 'master' of https://github.com/dtunes/laradock:
Upgrade hugo to 0.20.2 and added uglyurls = true to fix issues we when upgrading from 0.19 to 0.20 recently, also fixed 404 photos*
1. Repair git can not synchronize the BUG.
2. Increase the CDN query real IP, cross-domain request plugin.
you can use git xxx.com to sync code in caddy.
These duplicated Dockerfiles will be merged onto single Dockerfile
later. The same Dockerfile will check for the PHP version variable
and install the necessary softwar's accordingly.
These duplicated Dockerfiles will be merged onto single Dockerfile
later. The same Dockerfile will check for the PHP version variable
and install the necessary softwar's accordingly.
* 'master' of https://github.com/Laradock/laradock:
Fixed path variable for windows users
fixes up so Yarn is installable again
align file format
for file format
use '`' to quote identifier
use CREATE USER to define account authentication characteristics
use CREATE USER to define account authentication characteristics
Updated project example confs to fit nameing convention used in apache example
Updated project example confs to not have gitignore issues
docker-71 file now also works with new env-example setup
Adding Arg to docker-compose
Adding MSSQL Support
- add `project-1.conf` and `project-1.conf` to match the docs.
- keep default to work with both multiple and single projects.
- delete the .gitignore.
- update docker-compose and example-env file to match the new settings
- update the docs
- delete `laravel-https.conf` to replace it with documentation instead
* multiple-projects-improvement:
updated env-example and removed .env.example
complete missings
Seperated mysqli and tokenizer as seperate options without putting them under code igniter
Apache should just go to /var/www not /var/www/public when supporting multiple projects
fixed example and docker-compose.yml
Fixed php-fpm variables and example
Split up mysqli and tokenizer
Removed homestead entirely this time
Removed homestead entirely this time
Removed Homestead reference in all DB containers
Removed reference to homestead
Fixed timezone issue in docker-compose.yml
Added NGINX from env file and updated env-example
Updated PHP-FPM container to accept .env variables
Added workspace from env file and updated env-example
Removed .env file
Added env-example and adjusted docker-compose yml to support new env file
Updated gitignore
Changed to `docker ps` because this one word wraps. `docker-compose ps` will create a newline if text is too long in a small terminal window. Also `awk` represents tokens better than ones created with a " " delimiter.
* Mvzundert-multiple_frameworks:
complete missings
Seperated mysqli and tokenizer as seperate options without putting them under code igniter
Apache should just go to /var/www not /var/www/public when supporting multiple projects
fixed example and docker-compose.yml
Fixed php-fpm variables and example
Split up mysqli and tokenizer
Removed homestead entirely this time
Removed homestead entirely this time
Removed Homestead reference in all DB containers
Removed reference to homestead
Fixed timezone issue in docker-compose.yml
Added NGINX from env file and updated env-example
Updated PHP-FPM container to accept .env variables
Added workspace from env file and updated env-example
Removed .env file
Added env-example and adjusted docker-compose yml to support new env file
Updated gitignore
* 'multiple_frameworks' of https://github.com/Mvzundert/laradock:
Seperated mysqli and tokenizer as seperate options without putting them under code igniter
Apache should just go to /var/www not /var/www/public when supporting multiple projects
fixed example and docker-compose.yml
Fixed php-fpm variables and example
Split up mysqli and tokenizer
Removed homestead entirely this time
Removed homestead entirely this time
Removed Homestead reference in all DB containers
Removed reference to homestead
Fixed timezone issue in docker-compose.yml
Added NGINX from env file and updated env-example
Updated PHP-FPM container to accept .env variables
Added workspace from env file and updated env-example
Removed .env file
Added env-example and adjusted docker-compose yml to support new env file
Updated gitignore
This updates the download URL to include the DNS provider plugins so that we can use letsencrypt on our local environment. One thing to note, the version is not currently available as part of the dynamic download URL so this may need looking at in the future.
```
Step 15/32 : RUN if [ ${INSTALL_MEMCACHED} = true ]; then pecl install memcached && docker-php-ext-enable memcached ;fi
---> Running in b43e2e6b07f6
pecl/memcached requires PHP (version >= 7.0.0), installed version is 5.6.24
pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0)
pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0)
No valid packages found
install failed
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c if [ ${INSTALL_MEMCACHED} = true ]; then pecl install memcached && docker-php-ext-enable memcached ;fi' returned a non-zero code: 1
```
* xdebugPhpFpm permission denied fix
* xdebugPhpFpm might not have execution access when cloned. This
addition to readme helps tell the user why he got Permission Denied and
what can be done to fix it.
* Fix doesn't spelling, remove newline
* This is fixup for `38e26c3`.
Increasing buffer sizes for applications like react/babel.
Working on default images was throwing intermitten NGing errors and
requried multiple refreshes
When I submitted #538 it looks like I overlooked the crontab file
permissions for the Laradock user. This change ensure that all
crons added during build are set to the correct permission level.
Bug on Docker for Mac when we change the database from mysql to mariadb.
Maybe It is not a perfect fix. This fix will not share the same mysql volume, means we could not change database directly. We have to import the database to both database. But it will fix the Bug . Wish for better solution
- modified: README.md
- new file: _guides/photos/KiTTY/Connection.png
- new file: _guides/photos/KiTTY/ConnectionData.png
- new file: _guides/photos/KiTTY/ConnectionSSH.png
- new file: _guides/photos/KiTTY/ConnectionSSHAuth.png
- new file: _guides/photos/KiTTY/Session.png
- new file: _guides/photos/KiTTY/Terminal.png
- new file: _guides/photos/KiTTY/TerminalKeyboard.png
- new file: _guides/photos/KiTTY/TerminalShell.png
- new file: _guides/photos/KiTTY/Window.png
- new file: _guides/photos/KiTTY/WindowAppearance.png
- new file: _guides/photos/PHPStorm/DebugRemoteOn.png
- new file: _guides/photos/PHPStorm/RemoteDebuggingSuccess.png
- new file: _guides/photos/PHPStorm/RemoteHost.png
- new file: _guides/photos/PHPStorm/RemoteTestDebuggingSuccess.png
- new file: _guides/photos/PHPStorm/RemoteWebDebuggingSuccess.png
- new file: _guides/photos/PHPStorm/Settings/BuildDeploymentConnection.png
- new file: _guides/photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png
- new file: _guides/photos/PHPStorm/Settings/BuildDeploymentDebugger.png
- new file: _guides/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png
- new file: _guides/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png
- new file: _guides/photos/PHPStorm/Settings/LangsPHPDebug.png
- new file: _guides/photos/PHPStorm/Settings/LangsPHPInterpreters.png
- new file: _guides/photos/PHPStorm/Settings/LangsPHPPHPUnit.png
- new file: _guides/photos/PHPStorm/Settings/LangsPHPServers.png
- new file: _guides/photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png
- new file: _guides/photos/PHPStorm/Settings/WindowsHyperVManager.png
- new file: _guides/photos/PHPStorm/Settings/hosts.png
- new file: _guides/photos/SimpleHostsEditor/AddHost_laravel.png
- new file: _guides/phpstorm.md
When running docker-compose with mariadb the following message will appear:
ERROR: for mariadb Cannot create container for service mariadb: Invalid volume spec "mariadb": Invalid volume destination path: 'mariadb' mount path must be absolute.
ERROR: Encountered errors while bringing up the project.
This commit fixes the issue.
* 'master' of https://github.com/LaraDock/laradock:
Fix typo in README: Giude -> Guide
Added laravel cronjob
Added cron files copying to workspace crontab
Remove port fowarding for MySQL and MariaDB
Added NVM binaries in root bashrc
Allows a Windows Powershell user to enter a running container to avoid the following error message.
Interactive mode is not yet supported on Windows.
Please pass the -d flag when using `docker-compose exec`.
* 'master' of https://github.com/LaraDock/laradock:
Fixes#305
add mysql custom configuration file.
fix php warning "Unable to load dynamic library '/usr/lib/php/20151012/aerospike.so'" when aerospike set not install at workspace
add build options MAX_ALLOWED_PACKET to mysql
update readme for ElasticSearch.
Support ElasticSearch Container.
Add vue-cli on workspace npm global installers
modify words in Chinese
Add aerospike extension installation on phpfpm-56 as well
These environment variables are not needed since they are only being used at build time and we are already specifying them using the ARG command, no need to specify it twice since it increases build time and size.
* 'master' of https://github.com/LaraDock/laradock:
fix caddy Dockerfile from previous commit.
caddy log to file. enable gzip compression.
update caddy to v0.9.1
Laravel 5.3 is published officially
Create README-zh.md
Since 5.5 and 5.6 dockerfiles are identical execept the base image php version.
Will let the users switch the php 5.6 and 5.5 version from the Dockerfile-5 by changing one char
in the first line. Removing this duplication will make contribution and maintance easier and faster.
I've placed the `application` and `data` directories into a `volumes`
subdirectory. The top level `data` directory is now used for storing the
data used by the database (and other, if any) containers. The `data`
directory has also been added to the `.gitignore` file to prevent
accidental pushing of user data.
All of the database data volume mapping have been changed from the host's
`/var/lib` directory to locally alongside the laradock installation. This
should hopefully prevent issues where data disappears after containers are
restarted or data on the host machine is overwritten by accident (scary!)
Additionally this should make data easier to backup between installations
- especially on Windows where `/var` does not exist and is created
transparently by Docker Machine/Windows beta.
This change will most likely cause data to disappear from existing
installations, however it may reappear if moved to it's new home.
References #137, #138
Added an untracked `.env` file to the root directory to prevent the
`WARNING: The INSTALL_PRESTISSIMO variable is not set` message from being
displayed when `docker-compose` is run.
Added section in README for optional features.
* support-mongo:
add Mongo Support to the Readme
added php-mongodb extension
simple reformatting
set the original volume path
get mongo volum from the data container
added mongodb driver for php5.5 5.6
added mongodb image + PHP7 driver
Fix Conflicts in:
docker-compose.yml
php-fpm/Dockerfile-55
php-fpm/Dockerfile-56
php-fpm/Dockerfile-70
php-fpm/laravel.ini
Because there's some difference in installing some libraries
between PHP 5 and PHP 7. There must be multiple php dockerfiles.
For that I created 3 docker files each of a different version,
this will make it easy for the users to switch between the PHP
version by just editing the docker-compose file and not touching
the dockerfiles.
- upgrade docker compose to v2
- build images locally instead of pulling them from the registry
- separate php container form nginx container
- support all the php versions including php 7.0
- remove beanstalked container to be optionally added later by the user
If you have questions about how to use Laradock, please direct your questions to the discussion on [Gitter](https://gitter.im/Laradock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as `Question`) And you can still seek help on Gitter for it.
## Found an Issue
If have an issue or you found a typo in the documentation, you can help us by
opnening an [Issue](https://github.com/laradock/laradock/issues).
**Steps to do before opening an Issue:**
1. Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).
2. Decide if the Issue belongs to this project or to [Docker](https://github.com/docker) itself! or even the tool you are using such as Nginx or MongoDB...
If your issue appears to be a bug, and hasn't been reported, then open a new issue.
*This Help us to maximize the effort we can spend fixing issues and adding new
features, by not reporting duplicate issues.*
## Want a Feature
You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as `Feature Suggestion`). If you would like to implement a new feature then consider submitting a Pull Request yourself.
## Update the Documentation (Site)
Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly.
Go the `DOCUMENTATION/content` and search for the markdown file you want to edit
Note: Every folder represents a section in the sidebar "Menu". And every page and sidebar has a `weight` number to show it's position in the site.
To update the sidebar or add a new section to it, you can edit this `DOCUMENTATION/config.toml` toml file.
> The site will be auto-generated in the `docs/` folder by [Travis CI](https://travis-ci.org/laradock/laradock/).
### Host the documentation locally
1. Install [Hugo](https://gohugo.io/) on your machine.
2. Edit the `DOCUMENTATION/content`.
3. Delete the `/docs` folder from the root.
4. After you finish the editing, go to `DOCUMENTATION/` and run the `hugo` command to generate the HTML docs (inside a new `/docs` folder).
## Support new Software (Add new Container)
* Forke the repo and clone the code.
* Create folder as the software name (example: `mysql` - `nginx`).
* Add your `Dockerfile` in the folder "you may add additional files as well".
* Add the software to the `docker-compose.yml` file.
* Make sure you follow the same code/comments style.
* Add the environment variables to the `env-example` if you have any.
* **MOST IMPORTANTLY** updated the `Documentation`, add as much information.
* Submit a Pull Request, to the `master` branch.
## Edit supported Software (Edit a Container)
* Forke the repo and clone the code.
* Open the software (container) folder (example: `mysql` - `nginx`).
* Edit the files.
* Make sure to update the `Documentation` in case you made any changes.
* Submit a Pull Request, to the `master` branch.
## Edit Base Image
* Open any dockerfile, copy the base image name (example: `FROM phusion/baseimage:latest`).
* Search for the image in the [Docker Hub](https://hub.docker.com/search/) and find the source..
*Most of the image in Laradock are offical images, these projects live in other repositories and maintainer by other orgnizations.*
**Note:** Laradock has two base images for (`Workspace` and `php-fpm`, mainly made to speed up the build time on your machine.
* Find the dockerfiles, edit them and submit a Pull Request.
* When updating a Laradock base image (`Workspace` or `php-fpm`), ask a project maintainer "Admin" to build a new image after your PR is merged.
**Note:** after the base image is updated, every dockerfile that uses that image, needs to update his base image tag to get the updated code.
<br>
## Submit Pull Request Instructions
### 1. Before Submitting a Pull Request (PR)
Always Test everything and make sure its working:
- Pull the latest updates (or fork of you don’t have permission)
- Before editing anything:
- Test building the container (docker-compose build --no-cache container-name) build with no cache first.
- Test running the container with some other containers in real app and see of everything is working fine.
- Now edit the container (edit section by section and test rebuilding the container after every edited section)
- Testing building the container (docker-compose build container-name) with no errors.
- Test it in a real App if possible.
### 2. Submitting a PR
Consider the following guidelines:
* Search [GitHub](https://github.com/laradock/laradock/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate efforts.
* Make your changes in a new git branch:
```shell
git checkout -b my-fix-branch master
```
* Commit your changes using a descriptive commit message.
* Push your branch to GitHub:
```shell
git push origin my-fix-branch
```
* In GitHub, send a pull request to `laradock:master`.
* If we suggest changes then:
* Make the required updates.
* Commit your changes to your branch (e.g. `my-fix-branch`).
* Push the changes to your GitHub repository (this will update your Pull Request).
> If the PR gets too outdated we may ask you to rebase and force push to update the PR:
```shell
git rebase master -i
git push origin my-fix-branch -f
```
*WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.*
### 3. After your PR is merged
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
```shell
git push origin --delete my-fix-branch
```
* Check out the master branch:
```shell
git checkout master -f
```
* Delete the local branch:
```shell
git branch -D my-fix-branch
```
* Update your master with the latest upstream version:
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)_
Your folder structure should look like this:
```
+ project-a
+ laradock-a
+ project-b
+ laradock-b
```
_(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:
1 - Clone this repository anywhere on your machine:
2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains.
Laradock by default includes `project-1.conf` and `project-2.conf` as working samples.
3 - change the default names `project-n`:
You can rename the config files, project folders and domains as you like, just make sure the `root` in the config files, is pointing to the correct project folder name.
4 - Add the domains to the **hosts** files.
```
127.0.0.1 project-1.dev
127.0.0.1 project-2.dev
```
> **Now jump to the [Usage](#Usage) section.**
[]()
# 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)_
<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>
1 - Enter the laradock folder and copy `env-example` to `.env`
```shell
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:
```bash
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)._
<br>
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...)
```bash
docker-compose exec workspace bash
```
_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:
_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
Open your PHP project's `.env` file or whichever configuration file you are reading from, and set the database host `DB_HOST` to `mysql`:
```env
DB_HOST=mysql
```
_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
$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
```
Note that more containers are available, find them in the [docs](http://laradock.io/introduction/#supported-software-containers) or the `docker-compose.yml` file.
## Go to Your Workspace
```
docker-compose exec workspace bash
```
## Install and configure Laravel
Let's install Laravel's dependencies, add the `.env` file, generate the key and give proper permissions to the cache folder.
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.
[]()
## 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`.
[]()
## 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`.
- [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).
[]()
## 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.
- 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 ###############
workspace:
build:
context: ./workspace
args:
- INSTALL_XDEBUG=true
- INSTALL_WORKSPACE_SSH=true
...
### PHP-FPM Container #####################
php-fpm:
build:
context: ./php-fpm
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
xdebug.remote_connect_back=1
xdebug.cli_color=1
```
[]()
### 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.
- 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`
- I added this to my `.bashrc` to remove orphaned images.
```
dclean() {
processes=`docker ps -q -f status=exited`
if [ -n "$processes" ]; thend
docker rm $processes
fi
images=`docker images -q -f dangling=true`
if [ -n "$images" ]; then
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'
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.
Join the chat room on [Gitter](https://gitter.im/Laradock/laradock) and get help and support from the community.
You can as well can open an [issue](https://github.com/laradock/laradock/issues) on Github (will be labeled as Question) and discuss it with people on [Gitter](https://gitter.im/Laradock/laradock).
Includes pre-packaged Docker Images, all pre-configured to provide a wonderful PHP development environment.
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...
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 sumit it. Contributions are welcomed :)
<aname="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 Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.
<aname="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).
Sections such as www.example.com/foo/ will now be rendered with a list of all pages that are part of this section. The list shows the pages' title and a summary of their content.
[Show me the diff](https://github.com/digitalcraftsman/hugo-material-docs/commit/1f8393a8d4ce1b8ee3fc7d87be05895c12810494)
### 22nd March 2016
#### Changing setup for Google Analytics
Formerly, the tracking id for Google Analytics was set like below:
```toml
[params]
google_analytics=["UA-XXXXXXXX-X","auto"]
```
Now the theme uses Hugo's own Google Analytics config option. The variable moved outside the scope of `params` and the setup requires only the tracking id as a string:
```toml
googleAnalytics="UA-XXXXXXXX-X"
```
[Show me the diff](https://github.com/digitalcraftsman/hugo-material-docs/commit/fa10c8eef935932426d46b662a51f29a5e0d48e2)
Next, take a look in the `exampleSite` folder at. This directory contains an example config file and the content for the demo. It serves as an example setup for your documentation.
Copy at least the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary.
Hugo includes a development server, so you can view your changes as you go -
very handy. Spin it up with the following command:
``` sh
hugo server
```
Now you can go to [localhost:1313](http://localhost:1313) and the Material
theme should be visible. For detailed installation instructions visit the [demo](http://themes.gohugo.io/theme/material-docs/).
Noteworthy changes of this theme are listed in the [changelog](https://github.com/digitalcraftsman/hugo-material-docs/blob/master/CHANGELOG.md).
## Acknowledgements
A big thank you to [Martin Donath](https://github.com/squidfunk). He created the original [Material theme](https://github.com/squidfunk/mkdocs-material) for Hugo's companion [MkDocs](http://www.mkdocs.org/). This port wouldn't be possible without him.
Furthermore, thanks to [Steve Francia](https://gihub.com/spf13) for creating Hugo and the [awesome community](https://github.com/spf13/hugo/graphs/contributors) around the project.
## License
The theme is released under the MIT license. Read the [license](https://github.com/digitalcraftsman/hugo-material-docs/blob/master/LICENSE.md) for more information.
<bodyclass="{{ with .Site.Params.palette.primary }}palette-primary-{{ . }}{{end }} {{ with .Site.Params.palette.accent }}palette-accent-{{ . }}{{ end }}">
[Docker](https://www.docker.com) 是一个开源项目,自动化部署应用程序软件的容器,在 Linux, Mac OS and Windows 提供一个额外的抽象层和自动化的[操作系统级的虚拟化](https://en.wikipedia.org/wiki/Operating-system-level_virtualization)
It includes a Laravel `v5.1.10` fresh installation and a pre-configured **Docker Compose** file (containg most required **images** to run a Laravel application).
**Watch the demonstration video [https://www.youtube.com/watch?v=3YQsHe6oF80](https://www.youtube.com/watch?v=3YQsHe6oF80).**
[Docker](https://www.docker.com) is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of [operating-system-level virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) on Linux, Mac OS and Windows.
### What is Laravel?
Are you serious!!
### Why Docker not Vagrant?!
[Vagrant](https://www.vagrantup.com) gives you Virtual Machines in minutes while Docker gives you Linux 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.
### What's next?
LaraDock strives to make the development experience easier.
And it is inspired by [Laravel Homestead](http://laravel.com/docs/master/homestead).
*In the near future LaraDock will become a stand-alone package that manages your Docker Virtual Containers as Homestead does with your Vagrant Virtual Machines.*
### Questions?
If you have any questions please share it with us on [](https://gitter.im/LaraDock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) or email me on (mahmoud@zalt.me).
*Note: Git & Composer can be installed on Docker Containers if you don't want to install them on your machine. (But you have to do this yourself for now).*
<aname="Tutorial"></a>
## Tutorial
What's better than a quick [video](https://www.youtube.com/watch?v=3YQsHe6oF80) ;)
7 - Edit the hosts file `/etc/hosts` on your machine, to map your `Docker IP` to the `laravel.dev` domain
```bash
sudo nano /etc/hosts
```
`127.0.0.x laravel.dev`
> To find the IP address:
>
> - if you are on Linux, the containers run directly on your localhost so this `127.0.0.1` will be your IP Address.
> - if you are on MAC and using **boot2docker**, type `boot2docker ip` when boot2docker is up.
> - if you are on MAC and using **docker-machine**, type `docker-machine ip {VM-Name}` after starting a virtual machine.
> - if you are on Windows, check the Docker documentation for how you get the VM IP Address.
8 - Additional step for `Docker-Machine` users only. *(Skip this if you are not using `Docker-Machine`)*:
a. Edit this file `docker/docker-compose.yml`
b. Uncomment:
```yaml
# extra_hosts:
# - "laravel.dev:xxx.xxx.xxx.xxx"
```
c. Replace `xxx.xxx.xxx.xxx` with your the VM IP address.
9 - Finally run the containers and start coding.
*"Note: Only the first you run this command will take up to 7 minutes (depend on your connection speed) to download the images to your local machine, Only once in life.*
```bash
docker-compose up -d
```
10 - Open your browser and visit `http://laravel.dev`
*Note: Careful with this command as it will delete your Data Volume Container as well. (if you want to keep your Database data than you should stop each container by itself as follow):*
`docker stop {container-name}`
#### Delete an Image (remove the unused software)
To delete an image (software), just edit the `laradock/docker/docker-compose.yml` file.
**Example:** Assume you want to remove the `Beanstalkd` Container.
Open the `docker-compose.yml` file, and comment out the `beanstalkd` section:
#### Add an Image (add a software to run with other Containers)
To add an image (software), just edit the `laradock/docker/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/yml/).
#### Edit a Container (change Ports or Volumes)
To modify a container you can simply open the `laradock/docker/docker-compose.yml` and change everything you want.
Example: if you want to set the MySQL port to 3333, just replace the default port with yours:
```yml
ports:
- "3333:3306"
```
#### Edit an existing Image (change some configuration in the image)
To edit an image, and take full control of it:
1. clone the LaraDock `docker-images` repository [https://github.com/LaraDock/docker-images](https://github.com/LaraDock/images)
2. modify whichever `Dockfile` you want
3. from the modified image directory run `docker build -t {your-image-name} .`
All the images are open source and hosted on the [Docker Hub](https://hub.docker.com/u/laradock/).
*If you find any bug or you have and suggestion that can improve the performance of any image, please consider contributing. Thanks in advance.*
#### View the Log files
The Log files are stored in the `laradock/docker/logs` directory.
## Contributing
All contributions are welcomed.
## Support
[Issues](https://github.com/laradock/laradock/issues) on Github.
Please note that only issues related to this Docker image will be addressed here.
* If you have Docker related issues, please ask in the [Docker user mailing list](https://groups.google.com/forum/#!forum/docker-user).
* If you have Jenkins related issues, please ask in the [Jenkins mailing lists](https://jenkins-ci.org/content/mailing-lists).
* If you are not sure, then this is probably not the place to create an issue and you should use any of the previously mentioned mailing lists.
If after going through the previous checklist you still think you should create an issue here please provide:
* Docker commands that you execute
* Actual result
* Expected outcome
* Have you tried a non-dockerized Jenkins and get the expected outcome?
* Output of `docker version`
* Other relevant information
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.