-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
86 lines (72 loc) · 2.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# FROM debian:jessie
FROM openjdk:7
ENV COUCHDB_VERSION couchdb-search
ENV MAVEN_VERSION 3.3.3
RUN groupadd -r couchdb && useradd -d /opt/couchdb -g couchdb couchdb
RUN curl -fsSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \
&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
ENV MAVEN_HOME /usr/share/maven
ENV COUCHDB_VERSION 2.0.0
# Download dev dependencies
RUN apt-get update -y -qq && apt-get install -y --no-install-recommends --fix-missing \
apt-transport-https \
build-essential \
erlang-dev \
libcurl4-openssl-dev \
libicu-dev \
libmozjs185-dev \
ssh \
git-core \
supervisor \
ca-certificates \
curl \
erlang-nox \
erlang-reltool \
libicu52 \
libmozjs185-1.0 \
openssl \
libdbus-glib-1-2 \
openjdk-7-jdk \
&& curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& echo 'deb https://deb.nodesource.com/node_4.x jessie main' > /etc/apt/sources.list.d/nodesource.list \
&& echo 'deb-src https://deb.nodesource.com/node_4.x jessie main' >> /etc/apt/sources.list.d/nodesource.list \
&& apt-get update -y -qq \
&& apt-get install -y nodejs \
&& npm install -g grunt-cli \
# Acquire CouchDB source code
&& cd /usr/src \
&& git clone https://github.com/sam/couchdb.git \
&& cd couchdb \
# Build the release and install into /opt
&& ./configure --disable-docs \
&& make \
# Cleanup build detritus
&& cd /usr/src \
&& git clone https://github.com/cloudant-labs/clouseau \
&& cd /usr/src/clouseau \
&& mvn -Dmaven.test.skip=true install \
&& apt-get purge -y \
binutils \
build-essential \
cpp \
erlang-dev \
git \
libicu-dev \
make \
nodejs \
perl \
&& apt-get autoremove -y && apt-get clean \
&& apt-get install -y libicu52 --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* /usr/lib/node_modules
# Add configuration
COPY local.ini /usr/src/couchdb/rel/overlay/etc/
COPY vm.args /usr/src/couchdb/rel/overlay/etc/
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Setup directories and permissions
RUN chown -R couchdb:couchdb /usr/src/couchdb/
RUN mkdir -p /var/log/supervisor/ \
&& chmod 755 /var/log/supervisor/
WORKDIR /usr/src/couchdb
EXPOSE 5984
ENTRYPOINT ["/usr/bin/supervisord"]