【问题标题】:how to create an InfluxDB user in a Dockerfile如何在 Dockerfile 中创建 InfluxDB 用户
【发布时间】:2017-03-17 17:19:49
【问题描述】:

我在 dockerfile 中创建 InfluxDB 用户时遇到问题。我希望 dockerfile 也安装并启动influxd。对于 postgres,我可以在安装 postgres 后在我的 Dockerfile 中使用它:

RUN /etc/init.d/postgresql start &&\ psql --command "CREATE USER matt WITH PASSWORD 'test123';" &&\ createdb test_db &&\ psql --command "GRANT ALL PRIVILEGES ON DATABASE test_db TO matt;"

是否有 influxdb 的等价物?

【问题讨论】:

    标签: docker influxdb


    【解决方案1】:

    我最终使用了 tutumcloud/influxdb repo 的一部分:dockerfile 启动一个 shell 脚本,当它运行时,在后台启动 influxd,创建一个管理员用户,然后将 influxd 进程置于前台。

    【讨论】:

    • 可以分享一下脚本吗? @马特
    猜你喜欢
    • 2017-04-30
    • 2018-12-04
    • 2017-05-09
    • 1970-01-01
    • 2021-09-01
    • 2022-08-23
    • 1970-01-01
    • 1970-01-01
    • 2021-04-17
    相关资源
    最近更新 更多