Container exits with no log messages if configuration file is provided

Open
#204 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, dockerfile

Research direction

Start with the Docker entrypoint and the stack.yml reproduction, then inspect how files mounted under /opt/couchdb/etc/local.d/ are handled before CouchDB starts. Reproduce with admins.ini and Docker Swarm configuration; done means the container starts with the supplied config and emits normal logs instead of exiting with code 1.

Written by the indexing model from the issue text.

Description

Expected Behavior

The container should start using the config files provided.

Current Behavior

The container exits with code 1 and no log messages.

Possible Solution

Make configs in /etc/local.d/* readable before running couchdb in the docker entrypoint

Steps to Reproduce (for bugs)

stack.yml

services:
  couch1:
    image: couchdb:3.1
    configs:
      - source: admins
        target: /opt/couchdb/etc/local.d/10-admins.ini
configs:
  admins:
    file: ./admins.ini

admins.ini

[admins]
admin = -pbkdf2-2006b7b27f5f3624c54e37f5126f3db2bd515a0f,ac2121044edb47438573c80764ba7dc5,10000

Context

This bug prevents me from launching a cluster of couchdb instances in my docker swarm without setting the password as plaintext in the environment variables.

Workaround can be found here: https://github.com/apache/couchdb-docker/issues/73#issuecomment-766179802

Your Environment

Docker 20.10.8

Dominant language
Dockerfile
Stars
290
Forks
146
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/couchdb-docker

All issues in apache/couchdb-docker

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.