Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
964 views
in Technique[技术] by (71.8m points)

virtual machine - Running docker for windows for local development with an Ubuntu OS in production

My production instance is running under Ubuntu 16 while my local machine runs under Windows 10.

In order to have a setup close to my production, I use VMs (vagrant, virtualbox, homestead). Btw, my application is a Laravel app so homestead is the route to go as per its documentation.

Since I have multiple applications that have different specifications (different OS version, different app versions), I need to set multiple VMs as well. Since VMs are resource-heavy, it tends to slow down my machine in time.

That then, I came across Docker. Will Docker for Windows and create containers and images base on my app's specification suffice or do I still need a VM then create docker containers from there?

Below is a diagram

Windows running Docker for Windows

Windows running Docker for Windows

Windows running Ubuntu VM with Docker

Windows running Ubuntu VM with Docker

question from:https://stackoverflow.com/questions/65881796/running-docker-for-windows-for-local-development-with-an-ubuntu-os-in-production

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Docker-Desktop will by default start and run a Linux VM in the background of your Windows System.

https://docs.docker.com/docker-for-windows/install/

  • Hyper-V and Containers Windows features must be enabled.

You can also use WLS/2 which is basically the same thing.

https://docs.docker.com/docker-for-windows/wsl/

Jens


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...