码头化应用程序的配置 [英] Configuration of dockerized applications

查看:124
本文介绍了码头化应用程序的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何处理Docker容器的主机特定配置?

How do you deal with host-specific configuration for docker containers?

最重要的是生产密码。出于安全考虑,不能将其放在容器中。另外,他们需要定期更改,重新部署任何东西。

Most importantly production passwords. They can't be put to container for security reasons. Also, they need to be changed on regular basis w/o redeploying anything.

推荐答案

正如一条评论所说,使用环境变量可以通过 -e pass = abcdef 传递。您也可以将它们保存在fig.yml配置文件中,以避免每次都要输入。

As one comment says, use environment variables you can pass via -e pass=abcdef. You can also save them in a fig.yml config file to avoid having to type them every time.

这篇关于码头化应用程序的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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