This helps me get my Development environment up and running in a matter of minutes. <3 Docker. It is really helping me get everything setup, and easily repeatable.
# Pull all the required images to extend from
docker pull debian:jessie
docker pull nginx
docker pull php:5.6-fpm
docker pull redis
docker pull mariadb
docker pull elasticsearch# Create custom PHP image
cd images/php-fpm/
docker build -t drpain/php-custom .# Create the containers in the order of dependencies
cd ../../
./init_container.sh./start.sh./stop.sh./php-cli.sh script.php./php-cli-mysql.sh path-to/script.phpAfter starting the server with ./start.sh you will have an empty database. To import a Database you will need to have at least the mysql client installed.
A bit of googling will sort you out.
# For Ubuntu this is
sudo apt-get install mysql-clientOnce you have the client installed and the mysql running you can import it with the following command. Let's use a example sql file of database.sql
mysql -h 127.0.0.1 -u root -proot < database.sqlYou can also install the Redis Server tools, and connect to it for anything. Like Monitor.
# Ubuntu Example
sudo apt-get install redis-toolsConnecting to and monitoring redis.
redis-cli MONITOR