Restore setting of Erlang node & cookie for CouchDB
When we switched to the CentOS-based images this got wiped out
because the new vm.args pulled in from RPM-based CouchDB already
had these set to invalid values for actual clustering.
diff --git a/docker/couchdb/Dockerfile b/docker/couchdb/Dockerfile
index 280889b..9e38260 100644
--- a/docker/couchdb/Dockerfile
+++ b/docker/couchdb/Dockerfile
@@ -4,8 +4,10 @@
COPY couchdb.repo /etc/yum.repos.d/couchdb.repo
COPY init.sh /init.sh
COPY docker-entrypoint.sh /docker-entrypoint.sh
+COPY vm.args /opt/couchdb/etc/
-ARG OPENWHISK_REPO_HASH=fbc009170295a23473b1ee390985d4b4dda4aad0
+ARG OPENWHISK_REPO_URL=https://github.com/apache/incubator-openwhisk
+ARG OPENWHISK_REPO_HASH=fbc0091
USER root
@@ -19,10 +21,14 @@
&& mkdir /openwhisk \
&& mkdir /.ansible \
&& cd /openwhisk \
- && curl -L -o owsk.tar.gz https://github.com/apache/incubator-openwhisk/archive/$OPENWHISK_REPO_HASH.tar.gz \
+ && curl -L -o owsk.tar.gz $OPENWHISK_REPO_URL/archive/$OPENWHISK_REPO_HASH.tar.gz \
&& tar --strip-components=1 -xf owsk.tar.gz \
&& rm -rf owsk.tar.gz \
- && for d in /openwhisk /opt/couchdb /var/lib/couchdb /var/log/couchdb/ /.ansible; do chown jboss:root -R $d; chmod -R g+rwX $d; done
+ && for d in /openwhisk /opt/couchdb /var/lib/couchdb /var/log/couchdb/ /.ansible; do chown jboss:root -R $d; chmod -R g+rwX $d; done \
+ && rm -f /opt/couchdb/default.d/*.ini
+
+WORKDIR /opt/couchdb
+EXPOSE 5984 4369 9100
USER 1000
diff --git a/docker/couchdb/vm.args b/docker/couchdb/vm.args
new file mode 100644
index 0000000..0425756
--- /dev/null
+++ b/docker/couchdb/vm.args
@@ -0,0 +1,28 @@
+# 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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# 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
+
+# Tell kernel and SASL not to log anything
+-kernel error_logger silent
+-sasl sasl_error_logger false
+
+# Use kernel poll functionality if supported by emulator
++K true
+
+# Start a pool of asynchronous IO threads
++A 16
+
+# Comment this line out to enable the interactive Erlang shell on startup
++Bd -noinput