-
curl -sSL https://get.daocloud.io/docker | sh
-
sudo service docker status
-
curl -sSL https://get.daocloud.io/daomonit/install.sh | sh -s a805c99cf82d47faed274dfabc79a7449aa1d8bf
-
sudo usermod -aG docker vagrant
-
dao pull ubuntu
-
dao pull smerrill/vagrant-ubuntu-trusty-puppet
Ubuntu 14.0.4
Locate /opt/vagrant/embedded/gems/gems/vagrant-*/lib/vagrant
in the vagrant installation location, replace all https://rubygems.org
with https://ruby.taobao.org
, delete line gemfile.puts(%Q[source "http://gems.hashicorp.com"])
.
-
Dockerfile
-
nginx - drupal8.conf
-
mysql
sudo docker run --name some-mysql -v /web/data1:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=111 -d mysql
sudo docker inspect some-mysql
mysql -uroot -p111 -h 172.16.0.2
-
web server
sudo docker run --name drupal8 --link some-mysql:mysql -v /web/drupal8:/app/ -it qthhanfeng/u0
-
Start Server
sudo docker start some-mysql
sudo docker start drupal8
- docker ps -l
- docker inspect some-mysql
- docker attach some-mysql
Ctrl + P, Ctrl + Q
chown www-data www-data -R /app
- Install the symfony installer
wget http://symfony.com/installer
mv installer /usr/local/bin/symfony
chmod a+x /usr/local/bin/symfony
symfony new my_project
symfony new my_project 2.8
chown -R www-data:www-data my_project
-
docker 删除基于镜像的所有容器:
sudo docker ps -a | awk '{ print $1,$2 }' | grep 这里是镜像的名称| awk '{print $1 }' | xargs -I {} sudo docker rm {}
-
删除所有包含hanfeng 的镜像
sudo docker images | awk '{ print $1,$2 }' | grep hanfeng| awk '{print $1 }' | xargs -I {} sudo docker rmi {}