- docker-compose up -d 启动docker(如果没有nginx+php镜像会自动下载,比较慢,要改为阿里镜像)
- 改为阿里镜像
docker-machine ssh dataagg "echo 'EXTRA_ARGS=\"--registry-mirror=https://pee6w651.mirror.aliyuncs.com\"' | sudo tee -a /var/lib/boot2docker/profile"
- docker-compose ps 查看docker是否启动成功
- docker exec -it lzwjshop_sylius_1 sh 进入docker,查看目录是否挂载
ls -al - 如果没有挂载,在win7下可能目录挂载有问题,修改
docker-compose.yml
文件的这两行
volumes:
- /E/loserStarWorkSpace/lzwjShop:/home/lzwjShop
- /E/loserStarWorkSpace/lzwjShop/docker/nginx/conf.d:/etc/nginx/conf.d
docker-machine restart lzwjShop 重启dataagg docker虚拟机
docker-compose down 关闭docker
- /E/loserStarWorkSpace/lzwjShop:/home/lzwjShop
- /E/loserStarWorkSpace/lzwjShop/docker/nginx/conf.d:/etc/nginx/conf.d