Multi app development container.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore Working php7.0 image Apr 25, 2016
Dockerfile Use php 7.1 Oct 11, 2017 Update Readme Nov 23, 2017
docker-compose.dist.yml Use php 7.1 Oct 11, 2017 Use node v8 Oct 27, 2017 Use php 7.1 Oct 11, 2017
supervisor.conf Use php 7.1 Oct 11, 2017

Laravel homestead-docker

Create a homestead docker container for your development env. (Adapted from laravel homestead provisionning script)

Install docker && docker compose

please refer to these tutorials:

curl -sSL | sh
sudo curl -L`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Pull homestead image

docker pull shincoder/homestead:php7.1

Clone && Edit docker-compose.yml

git clone

rename docker-compose.dist.yml to docker-compose.yml then edit the file with you own paths and ports.

Start your containers

There are only two containers to run. web container ( includes everything except your database ), and mariadb container.

sudo docker-compose up -d

SSH into the container (password: secret):

ssh -p 2222 homestead@localhost

Add a virtual host

Assuming you mapped your apps folder to /apps (you can change mappings in the docker-compose.yml file, it's prefered to use absolute paths), you can do:

cd /
sudo ./ /apps/myapp/public
sudo supervisorctl restart all

In the host, update /etc/hosts to include your app domain:     

That's it

Our web container starts nginx, php-fpm, redis, beanstalk. and has npm, gulp, bower...etc


  • Since the web and database containers are linked you can use mysql as the host in your .env file with an empty password to properly connect to your database.