只進行單一語言的開發(fā),啟動一臺虛擬機,這種情況 docker 占用的資源會不會比較多?
既要進行 php 開發(fā),又要進行 python,兩個程序需要不同的環(huán)境,vagrant 進行開發(fā)的話,需要啟動兩個 vagrant 虛擬機才行,占用資源多,這時候選擇 Docker 會不會更好?
認證0級講師
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