Skip to content
This repository was archived by the owner on Sep 18, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7df08e9
Incorporate more feedback from official Docker image maintainers
wohali Nov 6, 2017
aa4ee2d
Bump to 1.7.0, 2.1.1
wohali Nov 6, 2017
1a7c425
Incorporate more feedback from @yosifkit
wohali Nov 7, 2017
0297605
1.7.1 release
janl Nov 11, 2017
98ad120
Remove haproxy from production image
kocolosk Jan 14, 2018
c1066ad
Use default.d for image-provided config in 2.x (#50)
kocolosk Jan 24, 2018
1f85f08
Use 5984:5984 as couchdb uid:gid, closes #53
wohali Jan 31, 2018
fd69b25
Improve README for configuration changes, closes #47
wohali Jan 31, 2018
c3ddd60
Rename dev to dev-cluster
kocolosk Jan 14, 2018
b273424
Introduce developer-friendly Dockerfile
kocolosk Jan 16, 2018
42de4b0
Install newer RTD theme from pip
kocolosk Jan 17, 2018
7efafe2
Add new targets to .travis.yml CI/CD
wohali Apr 9, 2018
45b9dd1
Further fixes for dev and dev-cluster targets
wohali Apr 11, 2018
dffb6e9
Update dev section
wohali Apr 11, 2018
aa7931f
Update Node for dev image
wohali Jul 10, 2018
a1f4d9d
update docs deps and dev-cluster node to 8.x
wohali Jul 10, 2018
4038958
Persist custom config settings across restarts
kocolosk May 21, 2018
59c4c8d
Fix configuration save
Maxima078 May 17, 2018
9057152
Backport fix for #81 and #82 to 2.1.x image
wohali Jul 10, 2018
ca9b039
Upgrade 1.7.1, 2.1.1 -> 1.7.2, 2.1.2
wohali Jul 10, 2018
0b03521
add end of line before inserting [admin] and [secret] in case of dock…
thomaspre Jul 12, 2018
0d8752e
Use debian stretch, closes #91
wohali Jul 24, 2018
dabb7d2
Prep 2.2.0 docker iamge
wohali Jul 26, 2018
f429c1c
Feedback from @tianon + deprecate 1.x images
wohali Aug 8, 2018
ca8c02b
Do not remove apt-transport-https
wohali Aug 29, 2018
87dc8d2
Added information about cluster configuration. This Fixes #106 (#108)
ufobat Sep 18, 2018
96378db
Set NODENAME and ERLANG_COOKIE if they are not set
amatas Sep 20, 2018
f581380
Fix identation and create file before set the permissions
amatas Sep 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ sudo: required
services:
- docker

before_install:
- docker build -t couchdb:1.6.1 1.6.1
- docker build -t couchdb:1.6.1-couchperuser 1.6.1-couchperuser
- docker build -t couchdb:2.1.0 2.1.0
env:
- RELEASES="1.7.2 1.7.2-couchperuser"
- RELEASES=2.2.0
- RELEASES=dev
- RELEASES=dev-cluster

script:
- docker run -d -p 5984:5984 couchdb:1.6.1 && sleep 5 && curl http://localhost:5984
- docker run -d -p 5985:5984 couchdb:1.6.1-couchperuser && sleep 5 && curl http://localhost:5985
- docker run -d -p 5986:5984 couchdb:2.1.0 && sleep 5 && curl http://localhost:5986
- for rel in $RELEASES; do docker build -t couchdb:$rel $rel; docker run -d --name $rel -p 5984:5984 couchdb:$rel && sleep 10 && curl http://localhost:5984 && docker kill $rel; done
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations under
# the License.

FROM couchdb:1.6.1
FROM couchdb:1.7.2

MAINTAINER CouchDB Developers [email protected]

Expand Down
57 changes: 33 additions & 24 deletions 1.6.1/Dockerfile → 1.7.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MAINTAINER CouchDB Developers [email protected]

# Install instructions from https://cwiki.apache.org/confluence/display/COUCHDB/Debian

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

RUN apt-get update -y && apt-get install -y --no-install-recommends \
ca-certificates \
Expand All @@ -28,27 +28,37 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
libnspr4-0d \
&& rm -rf /var/lib/apt/lists/*

# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.10
RUN set -x \
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true \
&& apt-get purge -y --auto-remove wget

# grab tini for signal handling
ENV TINI_VERSION v0.16.1
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc /usr/local/bin/tini.asc
RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \
&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \
&& chmod +x /usr/local/bin/tini
ENV TINI_VERSION 0.16.1
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends wget; \
rm -rf /var/lib/apt/lists/*; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
\
# install gosu
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
chmod +x /usr/local/bin/gosu; \
gosu nobody true; \
\
# install tini
wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-$dpkgArch"; \
wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7; \
gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini; \
rm -r "$GNUPGHOME" /usr/local/bin/tini.asc; \
chmod +x /usr/local/bin/tini; \
tini --version; \
\
apt-get purge -y --auto-remove wget

# https://www.apache.org/dist/couchdb/KEYS
ENV GPG_KEYS \
Expand All @@ -66,7 +76,7 @@ RUN set -xe \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
done

ENV COUCHDB_VERSION 1.6.1
ENV COUCHDB_VERSION 1.7.2

# download dependencies, compile and install couchdb,
# set correct permissions, expose couchdb to the outside and disable logging to disk
Expand All @@ -81,7 +91,7 @@ RUN buildDeps=' \
make \
' \
&& apt-get update && apt-get install -y --no-install-recommends $buildDeps \
&& curl -fSL http://apache.osuosl.org/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz -o couchdb.tar.gz \
&& curl -fSL https://apache.osuosl.org/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz -o couchdb.tar.gz \
&& curl -fSL https://www.apache.org/dist/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz.asc -o couchdb.tar.gz.asc \
&& gpg --batch --verify couchdb.tar.gz.asc couchdb.tar.gz \
&& mkdir -p /usr/src/couchdb \
Expand All @@ -102,7 +112,6 @@ RUN buildDeps=' \
&& sed -e 's!/usr/local/var/log/couchdb/couch.log$!/dev/null!' -i /usr/local/etc/couchdb/default.ini

COPY ./docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh

# Define mountable directories.
VOLUME ["/usr/local/var/lib/couchdb"]
Expand Down
26 changes: 25 additions & 1 deletion 1.6.1/docker-entrypoint.sh → 1.7.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,31 @@ if [ "$1" = 'couchdb' ]; then
chown couchdb:couchdb /usr/local/etc/couchdb/local.d/docker.ini
fi

printf "[httpd]\nport = %s\nbind_address = %s\n" ${COUCHDB_HTTP_PORT:=5984} ${COUCHDB_HTTP_BIND_ADDRESS:=0.0.0.0} > /usr/local/etc/couchdb/local.d/bind_address.ini
if [ -f /usr/local/etc/couchdb/local.d/bind_address.ini ]; then
if ! grep -Fq "port =" /usr/local/etc/couchdb/local.d/bind_address.ini; then
vport=$(printf "[httpd]\\\nport = %s" ${COUCHDB_HTTP_PORT:=5984})
if grep -qF '[httpd]' /usr/local/etc/couchdb/local.d/bind_address.ini; then
sed -i -e "s/\\[httpd\\]/$vport/g" /usr/local/etc/couchdb/local.d/bind_address.ini
else
printf "$vport" >> /usr/local/etc/couchdb/local.d/bind_address.ini
fi

fi

if ! grep -Fq "bind_address =" /usr/local/etc/couchdb/local.d/bind_address.ini; then
vaddress=$(printf "[httpd]\\\nbind_address = %s" ${COUCHDB_HTTP_BIND_ADDRESS:=0.0.0.0})
if grep -qF '[httpd]' /usr/local/etc/couchdb/local.d/bind_address.ini; then
sed -i -e "s/\\[httpd\\]/$vaddress/g" /usr/local/etc/couchdb/local.d/bind_address.ini
else
printf "$vaddress" >> /usr/local/etc/couchdb/local.d/bind_address.ini
fi

fi

else
printf "[httpd]\nport = %s\nbind_address = %s\n" ${COUCHDB_HTTP_PORT:=5984} ${COUCHDB_HTTP_BIND_ADDRESS:=0.0.0.0} > /usr/local/etc/couchdb/local.d/bind_address.ini
fi

chown couchdb:couchdb /usr/local/etc/couchdb/local.d/bind_address.ini

# if we don't find an [admins] section followed by a non-comment, display a warning
Expand Down
116 changes: 0 additions & 116 deletions 2.1.0/Dockerfile

This file was deleted.

File renamed without changes.
Loading