只进行单一语言的开发,启动一台虚拟机,这种情况 docker 占用的资源会不会比较多?
既要进行 php 开发,又要进行 python,两个程序需要不同的环境,vagrant 进行开发的话,需要启动两个 vagrant 虚拟机才行,占用资源多,这时候选择 Docker 会不会更好?
高洛峰2017-04-21 10:57:56
Docker is not a virtual machine, it is process isolation and consumes very little resources.
Vagrant is an encapsulation on the virtual machine, and the virtual machine itself consumes resources.
If you are originally using Linux, if it is scenario one or two, choose Docker
If you are using OSX or Windows, you need to open a virtual machine. In the first scenario, vagrant is easier. In the second scenario, you need to install Docker in vagrant