Docker集装箱最佳实践 [英] Docker Container Best Practices

查看:128
本文介绍了Docker集装箱最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出如何以最好的方式使用码头服务来保持我的新服务器环境的高效和有组织。但是我可以单独进行集装箱化,我想要一个
* redmine
* gitlab
的实例,可能还有一些东西。一个单独的数据库容器确实有用,以及数据卷/数据卷容器。



但是,如何为这两种服务提供共享的Web服务器?这可能/推荐吗?这种设置的推荐粒度是多少?

解决方案

普遍接受的做法是每个容器一个进程。 >

如果您愿意,您可以为这两个服务运行一个单一的Web服务器容器。如果你开始觉得每个虚幻的责任分歧,那么你可以把它分成两部分。


I'm trying to figure out how to use docker in the best possible way to keep my new server environment efficient and organized. However I struggle a little bit with what can be containerized separately. I want to have an instance of * redmine * gitlab and possibly some more stuff. A separate database container is for sure useful, as well as data volumes/data volume containers.

But how about eg a shared webserver for both these services? Is this possible/recommended? What is the recommended granularity of such a setup?

解决方案

The generally accepted practice is "one process per container".

You could run a single web server container for both services if you wanted to. If you started to feel like the responsibilities of each vhost were diverging, then you could split it into two.

这篇关于Docker集装箱最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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