#Vagrant using docker to setting Apache + Mysql in container
Its simple web service with Apache + MySQL Create 2 container inside docker-host
-
db
-
apache
##Usage
vagrant up
##Share floder
- (Mac)./app ~ (docker-host)/vargrant-app ~ (apache)/app
modify code its will update automatically
- (Mac)./log ~ (docker-host)/vargrant-log ~ (apache)/var/log/apache2
export log from container to PC
- (Mac)./log ~ (docker-host)/vargrant-log/mysql ~ (db)/var/log/mysql
mysql log
- (Mac)./data ~ (docker-host)/vargrant-data/mysql ~ (db)/var/lib/mysql
persitant mysql data.
3 and 4 not working
vagrant ssh
ssh to docker-host
docker ps
to check running container
mysql -uroot -h 192.168.36.10 -p"mypass"
to connect mysql