单纯的开发环境来说 Docker 和 Vagrant 该如何选择?
PHP中文网
PHP中文网 2017-04-21 10:55:56
0
1
654

场景一:单一开发环境

只进行单一语言的开发,启动一台虚拟机,这种情况 docker 占用的资源会不会比较多?

场景二:多环境开发

既要进行 php 开发,又要进行 python,两个程序需要不同的环境,vagrant 进行开发的话,需要启动两个 vagrant 虚拟机才行,占用资源多,这时候选择 Docker 会不会更好?

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
小葫芦

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template