[英]How can I make a local docker container?
I installed Docker and kitematic. 我安装了Docker和kitematic。 I had VirtualBox before that and used many machines on Vbox. 在此之前,我拥有VirtualBox,并在Vbox上使用了许多计算机。 Docker is working, I can pull containers and other stuff like that. Docker在工作,我可以拉容器之类的东西。 Like this link : https://docs.docker.com/mac/started/ I can add containers by: 像这个链接: https : //docs.docker.com/mac/started/我可以通过以下方式添加容器:
<i> docker run docker/whalesay cowsay boo </i>
I want to know if there is any way that I can import some of my Vbox machines into docker as a Container locally? 我想知道是否可以将某些Vbox计算机作为本地容器导入docker? I have ova and ovf file in my local pc. 我的本地PC中有ova和ovf文件。 I don't wanna get involved with online containers! 我不想参与在线容器! Is there any way to accomplish this. 有什么办法可以做到这一点。 Thank you. 谢谢。
Looks like you have some confusion on the concept of a container. 看起来您对容器的概念有些困惑。
A container is not a virtual machine . 容器不是虚拟机 。
You can't import virtual machines into Docker. 您无法将虚拟机导入Docker。 What you can do is build and run a Docker container which eliminates the need for a virtual machine (depending on your use case of course). 您可以做的是构建并运行一个Docker容器,从而无需使用虚拟机(当然,这取决于您的用例)。
You can find a good explanation about the difference between a container and a virtual machine here . 您可以在此处找到有关容器和虚拟机之间差异的很好的解释。
TL;DR : TL; DR :
Both virtual machines and containers allow you to run multiple applications on a shared hardware. 虚拟机和容器都允许您在共享硬件上运行多个应用程序。
When using virtual machines , the hardware is shared among all applications, however each application runs on a separate operating system . 使用虚拟机时 ,硬件在所有应用程序之间共享,但是每个应用程序都在单独的操作系统上运行 。
When using containers , both the hardware AND the operating system are shared, and each application runs in a separate container . 使用容器时 , 硬件和操作系统都是共享的,并且每个应用程序都在单独的容器中运行。
This is in no way an exhaustive explanation regarding Docker containers - there are MANY more advantages to using Docker instead of a virtual machine (portability, consistency, infrastructure-as-code). 这绝不是关于Docker容器的详尽解释-使用Docker而不是虚拟机有更多优势(可移植性,一致性,基础架构即代码)。 This is just the main difference between them. 这只是它们之间的主要区别。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.