You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2018/08/07 22:05:45 UTC

[couchdb-docker] 01/01: Prep 2.2.0 docker iamge

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 2.2.0
in repository https://gitbox.apache.org/repos/asf/couchdb-docker.git

commit be6b53dc3caad704541e48c4d1bcdc403d02edfa
Author: Joan Touzet <wo...@apache.org>
AuthorDate: Wed Jul 25 20:05:26 2018 -0700

    Prep 2.2.0 docker iamge
---
 .travis.yml                            |  2 +-
 {2.1.2 => 2.2.0}/10-docker-default.ini |  0
 {2.1.2 => 2.2.0}/Dockerfile            | 38 +++++++++++++++++-----------------
 {2.1.2 => 2.2.0}/docker-entrypoint.sh  |  0
 {2.1.2 => 2.2.0}/vm.args               |  0
 dev/docker-entrypoint.sh               |  4 ++--
 6 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 5811b4c..fb7596c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,7 @@ services:
 
 env:
   - RELEASES="1.7.2 1.7.2-couchperuser"
-  - RELEASES=2.1.2
+  - RELEASES=2.2.0
   - RELEASES=dev
   - RELEASES=dev-cluster
 
diff --git a/2.1.2/10-docker-default.ini b/2.2.0/10-docker-default.ini
similarity index 100%
rename from 2.1.2/10-docker-default.ini
rename to 2.2.0/10-docker-default.ini
diff --git a/2.1.2/Dockerfile b/2.2.0/Dockerfile
similarity index 89%
rename from 2.1.2/Dockerfile
rename to 2.2.0/Dockerfile
index ed9cc38..cc0dee6 100644
--- a/2.1.2/Dockerfile
+++ b/2.2.0/Dockerfile
@@ -17,17 +17,18 @@ MAINTAINER CouchDB Developers dev@couchdb.apache.org
 # Add CouchDB user account
 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 \
-    curl \
-    erlang-nox \
-    erlang-reltool \
-    libicu57 \
-    libmozjs185-1.0 \
-    openssl \
-    gpg \
-    dirmngr \
-  && rm -rf /var/lib/apt/lists/*
+RUN echo "deb https://apache.bintray.com/couchdb-deb stretch main" \
+      | sudo tee -a /etc/apt/sources.list \
+    && apt-get update -y && apt-get install -y --no-install-recommends \
+      ca-certificates \
+      couch-libmozjs185-1.0 \
+      curl \
+      dirmngr \
+      gnupg \
+      libicu57 \
+      openssl \
+      python \
+  && rm -rf /var/lib/apt/lists/* \
 
 # grab gosu for easy step-down from root and tini for signal handling
 # see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
@@ -50,7 +51,7 @@ RUN set -ex; \
 	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"; \
@@ -81,17 +82,17 @@ RUN set -xe \
     gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
   done
 
-ENV COUCHDB_VERSION 2.1.2
+ENV COUCHDB_VERSION 2.2.0
 
 # Download dev dependencies
 RUN buildDeps=' \
     apt-transport-https \
-    gcc \
-    g++ \
+    build-essential \
+    couch-libmozjs185-dev \
     erlang-dev \
+    erlang-reltool \
     libcurl4-openssl-dev \
     libicu-dev \
-    libmozjs185-dev \
     make \
   ' \
  && apt-get update -y -qq && apt-get install -y --no-install-recommends $buildDeps \
@@ -103,7 +104,7 @@ RUN buildDeps=' \
  && tar -xzf couchdb.tar.gz -C couchdb --strip-components=1 \
  && cd couchdb \
  # Build the release and install into /opt
- && ./configure --disable-docs \
+ && ./configure \
  && make release \
  && mv /usr/src/couchdb/rel/couchdb /opt/ \
  # Cleanup build detritus
@@ -115,8 +116,7 @@ RUN buildDeps=' \
 # Add configuration
 COPY 10-docker-default.ini /opt/couchdb/etc/default.d/
 COPY vm.args /opt/couchdb/etc/
-
-COPY ./docker-entrypoint.sh /
+COPY docker-entrypoint.sh /
 
 # Setup directories and permissions
 RUN chown -R couchdb:couchdb /opt/couchdb/etc/default.d/ /opt/couchdb/etc/vm.args
diff --git a/2.1.2/docker-entrypoint.sh b/2.2.0/docker-entrypoint.sh
similarity index 100%
rename from 2.1.2/docker-entrypoint.sh
rename to 2.2.0/docker-entrypoint.sh
diff --git a/2.1.2/vm.args b/2.2.0/vm.args
similarity index 100%
rename from 2.1.2/vm.args
rename to 2.2.0/vm.args
diff --git a/dev/docker-entrypoint.sh b/dev/docker-entrypoint.sh
index c60c957..4ba69b4 100755
--- a/dev/docker-entrypoint.sh
+++ b/dev/docker-entrypoint.sh
@@ -43,14 +43,14 @@ if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then
 	if [ "$COUCHDB_USER" ] && [ "$COUCHDB_PASSWORD" ]; then
 		# Create admin only if not already present
 		if ! grep -Pzoqr "\[admins\]\n$COUCHDB_USER =" /opt/couchdb/etc/local.d/*.ini; then
-			printf "[admins]\n%s = %s\n" "$COUCHDB_USER" "$COUCHDB_PASSWORD" >> /opt/couchdb/etc/local.d/docker.ini
+			printf "\n[admins]\n%s = %s\n" "$COUCHDB_USER" "$COUCHDB_PASSWORD" >> /opt/couchdb/etc/local.d/docker.ini
 		fi
 	fi
 
 	if [ "$COUCHDB_SECRET" ]; then
 		# Set secret only if not already present
 		if ! grep -Pzoqr "\[couch_httpd_auth\]\nsecret =" /opt/couchdb/etc/local.d/*.ini; then
-			printf "[couch_httpd_auth]\nsecret = %s\n" "$COUCHDB_SECRET" >> /opt/couchdb/etc/local.d/docker.ini
+			printf "\n[couch_httpd_auth]\nsecret = %s\n" "$COUCHDB_SECRET" >> /opt/couchdb/etc/local.d/docker.ini
 		fi
 	fi