Sandbox for development - container running Nginx + PHP-FPM
Based on Official PHP images Debian and all versions come with:
The sandbox uses Docker, a container tool for setting up a rapid development environment. The project has only two prerequisites:
- Docker (1.12+)
- Docker-composer (1.10+)
Acces to the container console easily:
docker run --rm -ti -v /your/project:/app dockerphp/nginx:7.1-jessie sh
Create a file called docker-compose.yml in your project directory and paste the following:
version: "2"
services:
app:
image: dockerphp/nginx:7.1-jessie
depends_on:
- db
- memcached
volumes:
- .:/app
- /app/var/
ports:
- "8080:443"
db:
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: root
ports:
- "3301:3306"
memcached:
image: memcached:latest
ports:
- "11221:11211"
mem_limit: 1g
pma:
image: phpmyadmin/phpmyadmin
depends_on:
- db
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: root
ports:
- "127.0.0.1:8081:80"Build and run your app with Compose:
$ docker-compose up
Enter http://localhost:8080/ in a browser to see the application running.
This project is released under the MIT License, you agree to license your code under the MIT license