Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

can't install in a docker contaienr

Open
#169 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, shell

Research direction

Start with Dockerfile.couchdb and reproduce the Ubuntu 20.04 installation using the documented debconf selections and apt-get command. Then inspect the debian packaging directory referenced in the issue, focusing on the couchdb post-installation step that exits with status 30. Done means the package configures successfully in the container.

Written by the indexing model from the issue text.

Description

I could use some help doing a stand alone install in a docker container.

I'm trying to make a docker container based on Ubuntu 20.04 which includes couchdb.

I'm trying to follow these:

I get into the container to do the install because re-building it was taking a while every time I tried to tweak something, so for now I'm manually follow this in the container: https://github.com/apache/couchdb-pkg/tree/main/debian

echo "couchdb couchdb/mode select standalone
couchdb couchdb/mode seen true
couchdb couchdb/bindaddress string 127.0.0.1
couchdb couchdb/bindaddress seen true
couchdb couchdb/adminpass password password
couchdb couchdb/adminpass seen true
couchdb couchdb/adminpass_again password password
couchdb couchdb/adminpass_again seen true" | debconf-set-selections

which I verify:

root@container:/# debconf-show couchdb
* couchdb/adminpass_again: (password omitted)
* couchdb/adminpass: (password omitted)
* couchdb/mode: standalone
* couchdb/bindaddress: 127.0.0.1

and then

apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes couchdb

which results in this:

root@container:/# DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes couchdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libicu66 libmozjs-68-0
Suggested packages:
  couchdb-nouveau
The following NEW packages will be installed:
  couchdb libicu66 libmozjs-68-0
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 79.1 MB of archives.
After this operation, 140 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libicu66 amd64 66.1-2ubuntu2.1 [8515 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libmozjs-68-0 amd64 68.6.0-1ubuntu1 [3201 kB]
Get:3 https://apache.jfrog.io/artifactory/couchdb-deb focal/main amd64 couchdb amd64 3.4.2~focal [67.4 MB]
Fetched 79.1 MB in 3s (24.4 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libicu66:amd64.
(Reading database ... 6861 files and directories currently installed.)
Preparing to unpack .../libicu66_66.1-2ubuntu2.1_amd64.deb ...
Unpacking libicu66:amd64 (66.1-2ubuntu2.1) ...
Selecting previously unselected package libmozjs-68-0:amd64.
Preparing to unpack .../libmozjs-68-0_68.6.0-1ubuntu1_amd64.deb ...
Unpacking libmozjs-68-0:amd64 (68.6.0-1ubuntu1) ...
Selecting previously unselected package couchdb.
Preparing to unpack .../couchdb_3.4.2~focal_amd64.deb ...
Unpacking couchdb (3.4.2~focal) ...
Setting up libicu66:amd64 (66.1-2ubuntu2.1) ...
Setting up libmozjs-68-0:amd64 (68.6.0-1ubuntu1) ...
Setting up couchdb (3.4.2~focal) ...
dpkg: error processing package couchdb (--configure):
 installed couchdb package post-installation script subprocess returned error exit status 30
Processing triggers for libc-bin (2.31-0ubuntu9.16) ...
Errors were encountered while processing:
 couchdb
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Sub-process /usr/bin/dpkg returned an error code (1)

here's the Dockerfile (Dockerfile.couchdb in my case):

FROM ubuntu:focal
# use this for reference https://github.com/apache/couchdb-docker/blob/main/build.sh
# and this https://docs.couchdb.org/en/stable/install/unix.html
# https://github.com/apache/couchdb-pkg/tree/main/debian


USER root
WORKDIR /

# Environment variables
ENV DEBIAN_FRONTEND=noninteractive \
    COUCHDB_PASSWORD=password \
    LANG=C.UTF-8 \
    LC_ALL=C.UTF-8


# setup timezone
RUN echo 'Etc/UTC' > /etc/timezone && \
    ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
    apt-get update && \
    apt-get install -q -y --no-install-recommends tzdata && \
    rm -rf /var/lib/apt/lists/*


RUN groupadd -g 5984 -r couchdb && useradd -u 5984 -d /opt/couchdb -g couchdb couchdb

RUN set -ex; \
    apt-get update; \
    apt-get install -y --no-install-recommends \
        apt-transport-https \
        ca-certificates \
        debian-keyring \
        debian-archive-keyring \
        dirmngr \
        gnupg \
        gnupg2 \
        curl \
        debconf-utils; \
    rm -rf /var/lib/apt/lists/*


# https://docs.couchdb.org/en/stable/install/unix.html
RUN curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1
RUN echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ focal main" \
    | tee /etc/apt/sources.list.d/couchdb.list >/dev/null


CMD ["bash"]

Expected Behavior

Couchdb installs.

Current Behavior

Couchdb install has errors.

Possible Solution

Steps to Reproduce (for bugs)

docker build -f Dockerfile.couchdb --no-cache -t test/couchdb .

docker run -it --init --rm --net=host test/couchdb

inside the running container

echo "couchdb couchdb/mode select standalone
couchdb couchdb/mode seen true
couchdb couchdb/bindaddress string 127.0.0.1
couchdb couchdb/bindaddress seen true
couchdb couchdb/adminpass password password
couchdb couchdb/adminpass seen true
couchdb couchdb/adminpass_again password password
couchdb couchdb/adminpass_again seen true" | debconf-set-selections
root@container:/# debconf-show couchdb
* couchdb/adminpass_again: (password omitted)
* couchdb/adminpass: (password omitted)
* couchdb/mode: standalone
* couchdb/bindaddress: 127.0.0.1

apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes couchdb

Context

Your Environment

  • Version used:
  • Browser Name and version:
  • Operating System and version (desktop or mobile): Host Ubuntu 24.04, container Ubuntu 20.04
  • Link to your project:
Dominant language
Shell
Stars
33
Forks
31
Avg merge
1h 43m
Merged PRs (30d)
1

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

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-pkg

All issues in apache/couchdb-pkg

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.