[英]How to create Docker container in windows to run in ubuntu vm
I have three small Springboot Microservices and a plan.我有三个小的 Springboot 微服务和一个计划。 I have to say that I develop in Eclipse under Windows10 Home.不得不说我是在Windows10 Home下的Eclipse开发的。
My plan is to build a Docker container of each one and run it in a ubuntu VM on my Windows pc, so that I can use the containers in a real linux server in the future. My plan is to build a Docker container of each one and run it in a ubuntu VM on my Windows pc, so that I can use the containers in a real linux server in the future.
Does this work?这行得通吗? What do I need?我需要什么? Is there a Docker for Windows that builds container for linux?是否有用于 Windows 的 Docker 为 linux 构建容器? How do I deploy the container to the vm?如何将容器部署到虚拟机? Do I have to push it to dockerhub first?我必须先将其推送到 dockerhub 吗? Can I access the container from a Windows Browser by some kind of port forwarding?我可以通过某种端口转发从 Windows 浏览器访问容器吗?
Thank you for your help....every hint is welcome.谢谢你的帮助....欢迎每一个提示。
You can use Docker for Desktop Windows with WSL 2 running a Ubuntu distro.您可以将 Docker 用于桌面 Windows 和运行 Ubuntu 发行版的 WSL 2。 It's the best setup to develop Docker for Linux, because of the incredible interoperability:这是为 Linux 开发 Docker 的最佳设置,因为具有令人难以置信的互操作性:
Go for it then, unless your machine has limitations against WSL. Go 然后,除非您的机器对 WSL 有限制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.