File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,21 @@ FROM debian:jessie
3
3
# Update distro
4
4
RUN apt-get update -y && apt-get -y upgrade && apt-get -y dist-upgrade
5
5
6
+ # Install Erlang 18 from source as the default version of Erlang 17 doesn't support CouchDB's SSL
7
+ # features
8
+ RUN apt-get install -y build-essential autoconf libncurses5-dev \
9
+ openssl libssl-dev fop xsltproc unixodbc-dev \
10
+ git wget \
11
+ && cd /usr/src \
12
+ && wget http://erlang.org/download/otp_src_18.3.tar.gz \
13
+ && tar zxvf otp_src_18.3.tar.gz \
14
+ && cd otp_src_18.3 \
15
+ && ./configure && make && make install
16
+
6
17
# Install CouchDB from source
7
18
RUN apt-get --no-install-recommends -y install \
8
- build-essential pkg-config erlang \
19
+ # build-essential pkg-config erlang \
20
+ build-essential pkg-config \
9
21
libicu-dev libmozjs185-dev libcurl4-openssl-dev \
10
22
wget curl ca-certificates \
11
23
&& cd /usr/src \
@@ -55,7 +67,7 @@ RUN npm install -g docker-discover-tasks
55
67
56
68
WORKDIR /home/couchdb/couchdb
57
69
58
- EXPOSE 5984 4369 9100-9200
70
+ EXPOSE 5984 6984 4369 9100-9200
59
71
60
72
VOLUME ["/home/couchdb/couchdb/data" ]
61
73
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # /docker-entrypoint.sh /home/couchdb/couchdb/bin/couchdb > /home/couchdb/couchdb/var/log/couch.log
4
3
/docker-entrypoint.sh /home/couchdb/couchdb/bin/couchdb
4
+ # /docker-entrypoint.sh /home/couchdb/couchdb/bin/couchdb > /home/couchdb/couchdb/var/log/couch.log 2>&1
Original file line number Diff line number Diff line change @@ -33,8 +33,14 @@ if [ "$1" = '/home/couchdb/couchdb/bin/couchdb' ]; then
33
33
34
34
if [ " $COUCHDB_CERT_FILE " ] && [ " $COUCHDB_KEY_FILE " ] && [ " $COUCHDB_CACERT_FILE " ]; then
35
35
# Enable SSL
36
- # printf "[daemons]\nhttpsd = {couch_httpd , start_link, [https]}\n\n" >> /home/couchdb/couchdb/etc/local.d/ssl.ini
36
+ printf " [daemons]\nhttpsd = {chttpd , start_link, [https]}\n\n" >> /home/couchdb/couchdb/etc/local.d/ssl.ini
37
37
printf " [ssl]\ncert_file = %s\nkey_file = %s\ncacert_file = %s\n" " $COUCHDB_CERT_FILE " " $COUCHDB_KEY_FILE " " $COUCHDB_CACERT_FILE " >> /home/couchdb/couchdb/etc/local.d/ssl.ini
38
+
39
+ # As per https://groups.google.com/forum/#!topic/couchdb-user-archive/cBrZ25DHHVA, due to bug
40
+ # https://issues.apache.org/jira/browse/COUCHDB-3162 we need the following lines. TODO: remove
41
+ # this in a later version of CouchDB 2.
42
+ printf " ciphers = undefined\ntls_versions = undefined\nsecure_renegotiate = undefined\n" >> /home/couchdb/couchdb/etc/local.d/ssl.ini
43
+
38
44
chown couchdb:couchdb /home/couchdb/couchdb/etc/local.d/ssl.ini
39
45
fi
40
46
You can’t perform that action at this time.
0 commit comments