Skip to content

Instantly share code, notes, and snippets.

@juliencrn
Last active August 21, 2019 13:21
Show Gist options
  • Save juliencrn/9210a515854f2f019bd9647c66f41733 to your computer and use it in GitHub Desktop.
Save juliencrn/9210a515854f2f019bd9647c66f41733 to your computer and use it in GitHub Desktop.
Setup LAMP using Devilbox (Docker based)

Local PHP server based on Docker

Requirements

  • Docker
  • Docker-compose

Installation

Get the devilbox

git clone https://github.com/cytopia/devilbox

Create docker-compose environment file

cd devilbox cp env-example .env

Edit your configuration

sudo vim .env

Usage

Start

sudo docker-compose up -d

Stop

sudo docker-compose stop

Enter in PHP container (for WP-CLI, start projects, mysql queries...)

sudo docker-compose exec --user devilbox php bash -l or ./shell.sh

Sources :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment