3.x docker image requires usernames longer than a single character
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
调研方向
从第 85 行附近的 docker-entrypoint.sh 正则表达式检查开始,使用文档中所述的、带有 COUCHDB_USER=l 的 docker run 命令重现该故障。检查单字符用户名是否被接受,以及 CouchDB 容器是否在没有所示验证错误的情况下启动。
由索引模型根据 Issue 内容生成。
描述
Expected Behavior
I expect to be able to set a username via the COUCHDB_USER environment variable with a length of 1 character.
Current Behavior
Previous versions of the docker image did not have any validation on service start. The current versions fails if the specified COUCHDB_USER is a single character.
You'll see the following message on container start with a single-character username:
*************************************************************
ERROR: CouchDB 3.0+ will no longer run in "Admin Party"
mode. You *MUST* specify an admin user and
password, either via your own .ini file mapped
into the container at /opt/couchdb/etc/local.ini
or inside /opt/couchdb/etc/local.d, or with
"-e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password"
to set it via "docker run".
*************************************************************
I believe the cause is the \w+ in the regex check here
Possible Solution
I think changing the \w+ to \w* will allow the previous behavior.
Steps to Reproduce (for bugs)
docker run -e COUCHDB_USER=l -e COUCHDB_PASSWORD=password -d couchdb
Here is an example of downstream usage of the image where it just constantly restarts the container (though the error message isn't surfaced as I don't surface that in the tests):
https://github.com/dokku/dokku-couchdb/runs/3578023307?check_suite_focus=true
Context
This breaks my tests, which I try to sync between all datastore plugins. Fixing it just means increasing the username length, but its annoying since now I can't easily copy the files over as tests change.
That said, its not a super-critical bug, just an annoying one.
Your Environment
- Version used: 3.1.1
- Browser Name and version: Safari Version 14.1.2 (16611.3.10.1.3)
- Operating System and version (desktop or mobile): macOS Big Sur 11.5
- Link to your project: https://github.com/dokku/dokku-couchdb
- 主要语言
- Dockerfile
- 星标
- 289
- 派生
- 146
- 平均合并
- 1 小时 49 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/couchdb-docker 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 45/100
apache/couchdb-docker#293 ·
-
难度 4/5 3-5 天 新手友好度 32/100
apache/couchdb-docker#292 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
apache/couchdb-docker#288 ·
-
难度 4/5 3-5 天 新手友好度 42/100
apache/couchdb-docker#285 ·
-
难度 1/5 1 小时以内 新手友好度 50/100
apache/couchdb-docker#283 ·
查看 apache/couchdb-docker 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
bigcapitalhq/bigcapital#1545 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
VH-Lab/DID-matlab#236 ·
维护者通常 1 天内回复
-
ai-audit
难度 1/5 1 小时以内 新手友好度 87/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复