This environment was created to work for vanilla PHP only. It might not work for frameworks
- PHP development environment running on Docker
- Includes Nginx and MariaDB
- Each service runs on its own docker container
- Install docker and docker-compose. Read how on the docker docs
- Clone this repo
- Put your
php
code inside thesrc
folder - Run
docker-compose up
(Add-d
to run in background) - Go to
http://localhost
on your browser - Enjoy!
- Type
Ctrl+C
to stop containers (ordocker-compose stop
)
- A docker-compose PHP environment from scratch
- Dockerise your PHP application with Nginx and PHP7-FPM
- Making your dockerised PHP application even better
- Docker for PHP developers
# list images/containers
docker image ls
docker container ls
# run docker containers
docker-compose up
# run docker containers in detached mode
docker-compose up -d
# re-build images
docker-compose up --build
# start containers
docker-compose start
# stop containers
docker-compose stop
# stop and delete containers
docker-compose down
# view containers logs
docker-compose logs