##Getting started
- Install docker
- Replace
~/Dev/potluck2
with your web root directory of choice. These commands give write access for that directory to pid 33 (docker)sudo chmod -R 770 ~/Dev/potluck2/public;sudo chgrp -R 33 ~/Dev/potluck2
sudo docker run -v ~/Dev/potluck2/public:/srv/http --name lamp -p 80:80 -p 443:443 -d greyltc/lamp
- Run Bash in MySQL container -
docker exec -it lamp bash
mysql -u root
CREATE USER 'zazzy'@'localhost' IDENTIFIED BY 'garbageboy';
quit
mysql -u root potluckdb < file.sql
quit
- Profit.
sudo docker stop/start/restart lamp
###Notes:
Windows: install Babun, then https://github.com/tiangolo/babun-docker
install that, run docker ps
, then run anything else.
Windows doesn't do ~/ locations for mounting volumes in docker in babun. Root relative only (/c/Users/...).