Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

3.x docker image requires usernames longer than a single character

Đang mở
#206 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, shell
Lĩnh vực
databases, devops

Hướng nghiên cứu

Bắt đầu với docker-entrypoint.sh, quanh phần kiểm tra regex ở dòng 85, và tái hiện lỗi bằng lệnh docker run được ghi trong tài liệu với COUCHDB_USER=l. Kiểm tra rằng tên người dùng gồm một ký tự được chấp nhận và container CouchDB khởi động mà không có lỗi xác thực như đã hiển thị.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Dockerfile
Star
290
Fork
146
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/couchdb-docker

Tất cả issue của apache/couchdb-docker

Issue tương tự

Thêm issue về Databases

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.