安装Apache CouchDB屏幕在容器重新启动时重新出现

安装Apache CouchDB屏幕在容器重新启动时重新出现,couchdb,couchdb-2.0,Couchdb,Couchdb 2.0,我使用正式的Docker映像运行CouchDB v2.3。我已经使用Fauxton将数据库配置为单个节点 /data目录被装载到本地目录。当我重新启动容器时,数据库仍然存在。因此,卷绑定按预期工作 现在,每当我重新启动容器并导航到“设置”选项卡时,CouchDB似乎不记得我已将其配置为单个节点 重新启动图像后,我一直看到以下屏幕 再次配置后,我会看到以下屏幕 直到我重新启动容器。然后我必须再次进入第一个屏幕 这是怎么回事?我使用了错误的路径来应用我自己的配置 非工作示例(Dockerfile

我使用正式的Docker映像运行CouchDB v2.3。我已经使用Fauxton将数据库配置为单个节点

/data目录被装载到本地目录。当我重新启动容器时,数据库仍然存在。因此,卷绑定按预期工作

现在,每当我重新启动容器并导航到“设置”选项卡时,CouchDB似乎不记得我已将其配置为单个节点

重新启动图像后,我一直看到以下屏幕

再次配置后,我会看到以下屏幕

直到我重新启动容器。然后我必须再次进入第一个屏幕

这是怎么回事?

我使用了错误的路径来应用我自己的配置

非工作示例(Dockerfile)

工作示例(Dockerfile)

local.ini

为了确保在重新启动Docker容器时不应重新配置集群,我还将配置放在local.ini文件中

; CouchDB Configuration Settings

; Custom settings should be made in this file. They will override settings
; in default.ini, but unlike changes made to default.ini, this file won't be
; overwritten on server upgrade.

[chttpd]
port = 5984
bind_address = 0.0.0.0

; To create an admin account uncomment the '[admins]' section below and add a
; line in the format 'username = password'. When you next start CouchDB, it
; will change the password to a hash (so that your passwords don't linger
; around in plain-text files). You can add more admin accounts with more
; 'username = password' lines. Don't forget to restart CouchDB after
; changing this.
[admins]
admin = ******

[cluster]
n = 1

我还不确定为什么我的初始配置复制到
/opt/couchdb/etc/local.d/docker.ini
之前不起作用。

参考我不确定我是否得到了它。由于重新启动Docker容器后数据库仍然可用,卷被重新装载。我也有这个问题。dockers/opt/couchdb/data的持久性可以毫无问题地工作,并且数据被保留,但不知何故,管理员用户和实际的couchdb设置并没有。我确信CouchDB的dockerhub页面上名为“使用持久CouchDB配置文件”的标题可以解决这个问题。现在我不知道为什么复制的文件没有,couchdb v3也有类似的问题。我还没有解决方案:(
FROM couchdb:2.3.0
COPY local.ini /opt/couchdb/etc/local.ini
; CouchDB Configuration Settings

; Custom settings should be made in this file. They will override settings
; in default.ini, but unlike changes made to default.ini, this file won't be
; overwritten on server upgrade.

[chttpd]
port = 5984
bind_address = 0.0.0.0

; To create an admin account uncomment the '[admins]' section below and add a
; line in the format 'username = password'. When you next start CouchDB, it
; will change the password to a hash (so that your passwords don't linger
; around in plain-text files). You can add more admin accounts with more
; 'username = password' lines. Don't forget to restart CouchDB after
; changing this.
[admins]
admin = ******

[cluster]
n = 1