docker - 提供一种在 docker 中更改或覆盖 zookeeper 配置的方法
问题描述
我将 docker 与 zookeeper 一起使用,
COPY zookeeper-3.4.12.tar.gz /opt
RUN cd /opt && \
tar -xvf zookeeper-3.4.12.tar.gz
ENV ZK_HOME /opt/zookeeper-3.4.12
zoo.cfg 有很多配置,我想更改这些参数,zoo.cfg
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
一些 docker 实例更改 syncLimit = 10,一些 docker 实例更改 tickTime=1000 我应该使用 ARG,通过 docker run env 传递这些参数吗?但是如何更改 zoo.cfg 内容?我不想 docker exec -it dockerid,然后更改文件,然后提交。还有其他建议吗?
解决方案
推荐阅读
- android - 图片上传返回 File not found 异常
- amazon-web-services - 负载均衡器后面的 HTTPS->HTTP 是否被认为是安全的?
- excel - VBA/公式逻辑建议
- opencv - 如何使用 OpenCV Python 检测自然场景中文本的位置?
- ruby-on-rails - 如何从应用程序本身为应用程序设置配置或管理栏
- rest - 需要在路径注释中获取 - 区分大小写的配置文件名称
- c# - 生成的对象上的Unity null?
- angular - 遍历 BehaviorSubject 模板层的值
- xamarin.forms - 宽屏时 MasterDetailPage 从右到左的流向
- c++ - 为什么 std::set 容器使用比其数据大小更多的内存?