如何运行在不同的机器泊坞窗容器 [英] How to run docker containers on different machines

查看:156
本文介绍了如何运行在不同的机器泊坞窗容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置几个搬运工容器我的应用程序:


  1. MySQL的容器

  2. 应用程序服务器(tomcat7)容器

  3. 对于nginx的容器

  4. 对于Python龙卷风应用程序容器

在我的本地机器上,使用泊坞窗机,我已经尝试了所有这些容器和它们彼此互动。我创建了一个VirtualBox虚拟机boot2linux和设置的所有这些容器就可以了。

现在,生产我要在单独的服务器上运行这些容器中的每一个。有什么泊坞窗提供了快速/轻松地做到这一点?或者我应该建立在每个服务器上泊坞窗,相关的图像复制到该服务器,然后手动启动泊坞窗的图像在​​所有服务器上?


解决方案

  

或者我应该设置泊坞窗每个服务器上,相关的图像复制到该服务器,然后手动启动所有服务器上泊坞窗的图像?


是的,但你也应该:

https://docs.docker.com/engine/userguide/networking/images/overlay_network.png

然后你就可以在你的机器创建容器。

参见一个实际的例子了解泊坞窗集装箱网络

I've setup several docker containers for my application:

  1. container for mysql
  2. container for application server (tomcat7)
  3. container for nginx
  4. container for python tornado application

On my local machine, using docker-machine, I've tried all these containers and them interactive with each other. I created one virtualbox machine with boot2linux and setup all these containers on it.

Now, for production I am going to run each one of these containers on a separate server. Is there something docker provides to quickly/easily do this? Or should I set up docker on each server, copy relevant images to that server, and then start docker-images manually on all servers?

解决方案

Or should I set up docker on each server, copy relevant images to that server, and then start docker-images manually on all servers?

Yes, but you should also:

Then you can create your containers on your machines.

See a practical example at Understand Docker container networks

这篇关于如何运行在不同的机器泊坞窗容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆