3.x docker image requires usernames longer than a single character
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start with docker-entrypoint.sh around the regex check at line 85 and reproduce the failure using the documented docker run command with COUCHDB_USER=l. Check that a one-character username is accepted and that the CouchDB container starts without the shown validation error.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Dockerfile
- Stars
- 290
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/couchdb-docker
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
apache/couchdb-docker#293 ·
-
Docker Setup IssueOpen
Difficulty 4/5 3-5 days Newbie friendliness 32/100
apache/couchdb-docker#292 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
apache/couchdb-docker#288 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
apache/couchdb-docker#285 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 50/100
apache/couchdb-docker#283 ·
All issues in apache/couchdb-docker
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zcashlabs/thus-spoke-zakura#153 ·
Maintainers usually reply within 1 day
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
vectorize-io/hindsight#5276 ·
Maintainers usually reply within 1 day
-
duplicate request-theme
Difficulty 1/5 Under an hour Newbie friendliness 72/100
LizardByte/ThemerrDB#8856 · 1 comment ·
Maintainers usually reply within 1 day
-
perf(core): getComments() runs the approved count and the comment list as two sequential queriesOpenarea/core bot:bug bot:working
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
emdash-cms/emdash#3905 · 2 comments ·
Maintainers usually reply within 1 day
-
Arkansas 2025 tax is $1.70 high above $100,000 net taxable income ($3,809 + 3.9% rule)Possibly taken @PavelMakarchuk claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PolicyEngine/policyengine-us#9828 ·
Maintainers usually reply within 2 days