You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/09/12 08:09:33 UTC

[GitHub] [couchdb-docker] josegonzalez opened a new issue #206: 3.x docker image requires usernames longer than a single character

josegonzalez opened a new issue #206:
URL: https://github.com/apache/couchdb-docker/issues/206


   ## 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](https://github.com/apache/couchdb-docker/blob/main/3.1.1/docker-entrypoint.sh#L85)
   
   ## Possible Solution
   
   I think changing the `\w+` to `\w*` will allow the previous behavior.
   
   ## Steps to Reproduce (for bugs)
   
   ```shell
   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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] wohali commented on issue #206: 3.x docker image requires usernames longer than a single character

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #206:
URL: https://github.com/apache/couchdb-docker/issues/206#issuecomment-917688827


   That line has had  `\w+`  in it for quite some time, at least since 3.1.0:
   
   https://github.com/apache/couchdb-docker/pull/181/files retained it
   
   `\w+` should match on 1 or more characters. Setting it to `\w*` will mean matching 0 or more characters that aren't prefixed with `;`, which is not what we want.
   
   What was the last version that you used that worked?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-docker] josegonzalez commented on issue #206: 3.x docker image requires usernames longer than a single character

Posted by GitBox <gi...@apache.org>.
josegonzalez commented on issue #206:
URL: https://github.com/apache/couchdb-docker/issues/206#issuecomment-924482817


   The last image that worked was 2.3.1, which I don't think had this check.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org