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

[2/2] couchdb-docker git commit: 2.0: refactor and reduce image size

2.0: refactor and reduce image size

closes klaemo/docker-couchdb#32


Project: http://git-wip-us.apache.org/repos/asf/couchdb-docker/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-docker/commit/9d4172a9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-docker/tree/9d4172a9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-docker/diff/9d4172a9

Branch: refs/heads/master
Commit: 9d4172a9f39a4d4b461c1f1a71eabce3f2baafb4
Parents: ce8eea0
Author: klaemo <kl...@fastmail.fm>
Authored: Thu Dec 17 22:44:28 2015 +0100
Committer: klaemo <kl...@fastmail.fm>
Committed: Thu Dec 17 22:44:28 2015 +0100

----------------------------------------------------------------------
 2.0-dev/Dockerfile | 96 ++++++++++++++++++++++++++++++++-----------------
 README.md          |  2 +-
 2 files changed, 65 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-docker/blob/9d4172a9/2.0-dev/Dockerfile
----------------------------------------------------------------------
diff --git a/2.0-dev/Dockerfile b/2.0-dev/Dockerfile
index 52992dd..14b6afc 100644
--- a/2.0-dev/Dockerfile
+++ b/2.0-dev/Dockerfile
@@ -12,43 +12,74 @@
 
 FROM debian:jessie
 
-MAINTAINER Clemens Stolle klaemo@fastmail.fm
+MAINTAINER Clemens Stolle klaemo@apache.org
 
-ENV COUCHDB_VERSION developer-preview-2.0
+ENV COUCHDB_VERSION master
 
 RUN groupadd -r couchdb && useradd -d /usr/src/couchdb -g couchdb couchdb
 
 # download dependencies
-RUN apt-get update -y \
-  && apt-get install -y --no-install-recommends build-essential libmozjs185-dev \
-    libnspr4 libnspr4-0d libnspr4-dev libcurl4-openssl-dev libicu-dev \
-    openssl curl ca-certificates git pkg-config \
-    apt-transport-https python wget \
-    python-sphinx texlive-base texinfo texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra #needed to build the doc
-
-RUN wget http://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_18.0-1~debian~jessie_amd64.deb
-RUN apt-get install -y --no-install-recommends libwxgtk3.0 default-jdk
-RUN apt-get install -y --no-install-recommends procps
-
-RUN dpkg -i esl-erlang_18.0-1~debian~jessie_amd64.deb
-
-RUN git clone https://github.com/rebar/rebar /usr/src/rebar \
- && (cd /usr/src/rebar ; make && mv rebar /usr/local/bin/)
-
-RUN cd /usr/src \
-  && git clone https://git-wip-us.apache.org/repos/asf/couchdb.git \
-  && cd couchdb \
-  && git checkout master
-
-RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
-  && echo 'deb https://deb.nodesource.com/node jessie main' > /etc/apt/sources.list.d/nodesource.list \
-  && echo 'deb-src https://deb.nodesource.com/node jessie main' >> /etc/apt/sources.list.d/nodesource.list \
-  && apt-get update -y && apt-get install -y nodejs \
-  && npm install -g npm && npm install -g grunt-cli
-
-RUN apt-get -y install haproxy
-
-RUN cd /usr/src/couchdb && ./configure && make
+RUN apt-get update -y && apt-get install -y --no-install-recommends \
+    apt-transport-https \
+    build-essential \
+    ca-certificates \
+    curl \
+    default-jdk \
+    erlang-base-hipe \
+    erlang-dev \
+    erlang-eunit \
+    erlang-nox \
+    git \
+    haproxy \
+    libcurl4-openssl-dev \
+    libicu-dev \
+    libmozjs185-dev \
+    libnspr4 \
+    libnspr4-0d \
+    libnspr4-dev \
+    libwxgtk3.0 \
+    openssl \
+    pkg-config \
+    procps \
+    python \
+    python-sphinx \
+    texinfo \
+    texlive-base \
+    texlive-fonts-extra \
+    texlive-fonts-recommended \
+    texlive-latex-extra \
+    wget \
+ && git clone https://github.com/rebar/rebar /usr/src/rebar \
+ && (cd /usr/src/rebar ; make && mv rebar /usr/local/bin/) \
+ && cd /usr/src && git clone https://git-wip-us.apache.org/repos/asf/couchdb.git \
+ && cd couchdb && git checkout $COUCHDB_VERSION \
+ && curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
+ && echo 'deb https://deb.nodesource.com/node jessie main' > /etc/apt/sources.list.d/nodesource.list \
+ && echo 'deb-src https://deb.nodesource.com/node jessie main' >> /etc/apt/sources.list.d/nodesource.list \
+ && apt-get update -y && apt-get install -y nodejs \
+ && npm -g install npm@latest && npm install -g grunt-cli \
+ && cd /usr/src/couchdb && ./configure && make \
+ && apt-get purge -y \
+    binutils \
+    build-essential \
+    cpp \
+    default-jdk \
+    git \
+    libcurl4-openssl-dev \
+    libnspr4-dev \
+    libwxgtk3.0 \
+    make \
+    nodejs \
+    perl \
+    pkg-config \
+    texinfo \
+    texlive-base \
+    texlive-fonts-extra \
+    texlive-fonts-recommended \
+    texlive-latex-extra \
+    wget \
+ && apt-get autoremove -y && apt-get clean \
+ && rm -rf /var/lib/apt/lists/* /usr/lib/node_modules /usr/src/couchdb/src/fauxton/node_modules
 
 # permissions
 RUN chmod +x /usr/src/couchdb/dev/run && chown -R couchdb:couchdb /usr/src/couchdb
@@ -62,3 +93,4 @@ EXPOSE 5984
 WORKDIR /usr/src/couchdb
 
 ENTRYPOINT ["/usr/src/couchdb/dev/run"]
+CMD ["--with-haproxy"]

http://git-wip-us.apache.org/repos/asf/couchdb-docker/blob/9d4172a9/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index a7dc176..6b60254 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ Put the couch in a docker container and ship it anywhere.
 If you're looking for a CouchDB with SSL support you can check out [klaemo/couchdb-ssl](https://index.docker.io/u/klaemo/couchdb-ssl/)
 
 - Version (stable): `CouchDB 1.6.1`, `Erlang 17.3`
-- Version (dev): `CouchDB 2.0 developer preview`, `Erlang 18.0`
+- Version (dev): `CouchDB 2.0 master`, `Erlang 17.3`
 
 ## Features