You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2017/04/25 12:38:26 UTC

[couchdb-docker] 14/39: 2.0: bump to RC4 (#69)

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

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

commit 5382c3bffef47e5b54a0b9e7d2b3c9952ca21ded
Author: Clemens Stolle <kl...@fastmail.fm>
AuthorDate: Wed Aug 17 22:05:18 2016 +0200

    2.0: bump to RC4 (#69)
---
 .travis.yml                                     |  4 ++--
 2.0-dev/Dockerfile                              |  2 +-
 {2.0-rc3 => 2.0-rc4}/Dockerfile                 | 27 ++++++++++++++++++++-----
 2.0-rc3/vm.args => 2.0-rc4/docker-entrypoint.sh | 24 +++++++++++-----------
 {2.0-rc3 => 2.0-rc4}/local.ini                  |  0
 {2.0-rc3 => 2.0-rc4}/vm.args                    |  0
 6 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 1b53882..a322e09 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,9 +6,9 @@ services:
 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.0-rc3 2.0-rc3
+  - docker build -t couchdb:2.0-rc4 2.0-rc4
 
 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.0-rc3 && sleep 5 && curl http://localhost:5986
+  - docker run -d -p 5986:5984 couchdb:2.0-rc4 && sleep 5 && curl http://localhost:5986
diff --git a/2.0-dev/Dockerfile b/2.0-dev/Dockerfile
index 1d22720..3b12bb2 100644
--- a/2.0-dev/Dockerfile
+++ b/2.0-dev/Dockerfile
@@ -14,7 +14,7 @@ FROM debian:jessie
 
 MAINTAINER Clemens Stolle klaemo@apache.org
 
-ENV COUCHDB_VERSION 2.0.0-RC2
+ENV COUCHDB_VERSION 2.0.0-RC4
 
 RUN groupadd -r couchdb && useradd -d /usr/src/couchdb -g couchdb couchdb
 
diff --git a/2.0-rc3/Dockerfile b/2.0-rc4/Dockerfile
similarity index 66%
rename from 2.0-rc3/Dockerfile
rename to 2.0-rc4/Dockerfile
index 972833d..6065bc8 100644
--- a/2.0-rc3/Dockerfile
+++ b/2.0-rc4/Dockerfile
@@ -28,7 +28,21 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
     openssl \
   && rm -rf /var/lib/apt/lists/*
 
-ENV COUCHDB_VERSION 2.0.0-RC3
+# grab gosu for easy step-down from root and tini for signal handling
+RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
+  && curl -o /usr/local/bin/gosu -fSL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture)" \
+  && curl -o /usr/local/bin/gosu.asc -fSL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture).asc" \
+  && gpg --verify /usr/local/bin/gosu.asc \
+  && rm /usr/local/bin/gosu.asc \
+  && chmod +x /usr/local/bin/gosu \
+  && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \
+  && curl -o /usr/local/bin/tini -fSL "https://github.com/krallin/tini/releases/download/v0.9.0/tini" \
+  && curl -o /usr/local/bin/tini.asc -fSL "https://github.com/krallin/tini/releases/download/v0.9.0/tini.asc" \
+  && gpg --verify /usr/local/bin/tini.asc \
+  && rm /usr/local/bin/tini.asc \
+  && chmod +x /usr/local/bin/tini
+
+ENV COUCHDB_VERSION 2.0.0-RC4
 
 # Download dev dependencies
 RUN apt-get update -y -qq && apt-get install -y --no-install-recommends \
@@ -72,13 +86,16 @@ RUN apt-get update -y -qq && apt-get install -y --no-install-recommends \
 COPY local.ini /opt/couchdb/etc/
 COPY vm.args /opt/couchdb/etc/
 
-# Setup directory permissions
-RUN mkdir -p /opt/couchdb/data \
+COPY ./docker-entrypoint.sh /
+
+# Setup directories and permissions
+RUN chmod +x /docker-entrypoint.sh \
+ && mkdir /opt/couchdb/data /opt/couchdb/etc/local.d /opt/couchdb/etc/default.d \
  && chown -R couchdb:couchdb /opt/couchdb/
 
-USER couchdb
 WORKDIR /opt/couchdb
 EXPOSE 5984 4369 9100
 VOLUME ["/opt/couchdb/data"]
 
-ENTRYPOINT ["/opt/couchdb/bin/couchdb"]
+ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
+CMD ["/opt/couchdb/bin/couchdb"]
diff --git a/2.0-rc3/vm.args b/2.0-rc4/docker-entrypoint.sh
old mode 100644
new mode 100755
similarity index 56%
copy from 2.0-rc3/vm.args
copy to 2.0-rc4/docker-entrypoint.sh
index 0425756..d36ed8c
--- a/2.0-rc3/vm.args
+++ b/2.0-rc4/docker-entrypoint.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
 # use this file except in compliance with the License. You may obtain a copy of
 # the License at
@@ -10,19 +11,18 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-# Ensure that the Erlang VM listens on a known port
--kernel inet_dist_listen_min 9100
--kernel inet_dist_listen_max 9100
+set -e
 
-# Tell kernel and SASL not to log anything
--kernel error_logger silent
--sasl sasl_error_logger false
+if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then
+	# we need to set the permissions here because docker mounts volumes as root
+	chown -R couchdb:couchdb /opt/couchdb
 
-# Use kernel poll functionality if supported by emulator
-+K true
+	chmod -R 0770 /opt/couchdb/data
 
-# Start a pool of asynchronous IO threads
-+A 16
+	chmod 664 /opt/couchdb/etc/*.ini
+	chmod 775 /opt/couchdb/etc/*.d
 
-# Comment this line out to enable the interactive Erlang shell on startup
-+Bd -noinput
+	exec gosu couchdb "$@"
+fi
+
+exec "$@"
diff --git a/2.0-rc3/local.ini b/2.0-rc4/local.ini
similarity index 100%
rename from 2.0-rc3/local.ini
rename to 2.0-rc4/local.ini
diff --git a/2.0-rc3/vm.args b/2.0-rc4/vm.args
similarity index 100%
rename from 2.0-rc3/vm.args
rename to 2.0-rc4/vm.args

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.