couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kla...@apache.org
Subject couchdb-docker git commit: reorganize Dockerfile
Date Wed, 27 Jan 2016 12:20:24 GMT
Repository: couchdb-docker
Updated Branches:
  refs/heads/master 67281c476 -> a58886d54


reorganize Dockerfile

closes klaemo/docker-couchdb#44


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

Branch: refs/heads/master
Commit: a58886d54c50c633f1c1debf7b149db66b051d68
Parents: 67281c4
Author: Joe Ferguson <joe@infosiftr.com>
Authored: Tue Jan 26 10:56:41 2016 -0800
Committer: klaemo <klaemo@fastmail.fm>
Committed: Wed Jan 27 13:20:07 2016 +0100

----------------------------------------------------------------------
 1.6.1/Dockerfile | 81 ++++++++++++++++++++++++++++++---------------------
 1 file changed, 47 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-docker/blob/a58886d5/1.6.1/Dockerfile
----------------------------------------------------------------------
diff --git a/1.6.1/Dockerfile b/1.6.1/Dockerfile
index 66a00b4..3706c67 100644
--- a/1.6.1/Dockerfile
+++ b/1.6.1/Dockerfile
@@ -16,54 +16,67 @@ MAINTAINER Clemens Stolle klaemo@apache.org
 
 # Install instructions from https://cwiki.apache.org/confluence/display/COUCHDB/Debian
 
-ENV COUCHDB_VERSION 1.6.1
-
 RUN groupadd -r couchdb && useradd -d /var/lib/couchdb -g couchdb couchdb
 
-# download dependencies, compile and install couchdb
 RUN apt-get update -y && apt-get install -y --no-install-recommends \
-    build-essential \
     ca-certificates \
     curl \
-    erlang-dev \
     erlang-nox \
-    libcurl4-openssl-dev \
-    libicu-dev \
+    libicu52 \
     libmozjs185-1.0 \
-    libmozjs185-dev \
     libnspr4 \
     libnspr4-0d \
-    libnspr4-dev \
- && curl -sSL http://apache.openmirror.de/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz
-o couchdb.tar.gz \
- && curl -sSL https://www.apache.org/dist/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz.asc
-o couchdb.tar.gz.asc \
- && curl -sSL https://www.apache.org/dist/couchdb/KEYS -o KEYS \
- && gpg --import KEYS && gpg --verify couchdb.tar.gz.asc \
- && mkdir -p /usr/src/couchdb \
- && tar -xzf couchdb.tar.gz -C /usr/src/couchdb --strip-components=1 \
- && cd /usr/src/couchdb \
- && ./configure --with-js-lib=/usr/lib --with-js-include=/usr/include/mozjs \
- && make && make install \
- && apt-get purge -y \
-    binutils \
-    build-essential \
-    cpp \
-    libcurl4-openssl-dev \
-    libicu-dev \
-    libnspr4-dev \
-    make \
-    perl \
- && apt-get autoremove -y \
- && apt-get install -y libicu52 --no-install-recommends \
- && rm -rf /var/lib/apt/lists/* /usr/src/couchdb /couchdb.tar.gz* /KEYS
+  && rm -rf /var/lib/apt/lists/*
 
 # grab gosu for easy step-down from root, set correct permissions, expose couchdb to the
outside
 # and disable logging to disk
 RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
\
-  && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg
--print-architecture)" \
-  && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg
--print-architecture).asc" \
+  && 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 \
+  && chmod +x /usr/local/bin/gosu
+
+# https://www.apache.org/dist/couchdb/KEYS
+ENV GPG_KEYS \
+  15DD4F3B8AACA54740EB78C7B7B7C53943ECCEE1 \
+  1CFBFA43C19B6DF4A0CA3934669C02FFDF3CEBA3 \
+  25BBBAC113C1BFD5AA594A4C9F96B92930380381 \
+  4BFCA2B99BADC6F9F105BEC9C5E32E2D6B065BFB \
+  5D680346FAA3E51B29DBCB681015F68F9DA248BC \
+  7BCCEB868313DDA925DF1805ECA5BCB7BB9656B0 \
+  C3F4DFAEAD621E1C94523AEEC376457E61D50B88 \
+  D2B17F9DA23C0A10991AF2E3D9EE01E47852AEE4 \
+  E0AF0A194D55C84E4A19A801CDB0C0F904F4EE9B
+RUN set -xe \
+  && for key in $GPG_KEYS; do \
+    gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
+  done
+
+ENV COUCHDB_VERSION 1.6.1
+
+# download dependencies, compile and install couchdb
+RUN buildDeps=' \
+    gcc \
+    g++ \
+    erlang-dev \
+    libcurl4-openssl-dev \
+    libicu-dev \
+    libmozjs185-dev \
+    libnspr4-dev \
+    make \
+  ' \
+  && apt-get update && apt-get install -y --no-install-recommends $buildDeps
\
+  && curl -fSL http://apache.osuosl.org/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz
-o couchdb.tar.gz \
+  && curl -fSL https://www.apache.org/dist/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz.asc
-o couchdb.tar.gz.asc \
+  && gpg --verify couchdb.tar.gz.asc \
+  && mkdir -p /usr/src/couchdb \
+  && tar -xzf couchdb.tar.gz -C /usr/src/couchdb --strip-components=1 \
+  && cd /usr/src/couchdb \
+  && ./configure --with-js-lib=/usr/lib --with-js-include=/usr/include/mozjs \
+  && make && make install \
+  && apt-get purge -y --auto-remove $buildDeps \
+  && rm -rf /var/lib/apt/lists/* /usr/src/couchdb /couchdb.tar.gz* \
   && chown -R couchdb:couchdb \
     /usr/local/lib/couchdb /usr/local/etc/couchdb \
     /usr/local/var/lib/couchdb /usr/local/var/log/couchdb /usr/local/var/run/couchdb \
@@ -72,7 +85,7 @@ RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4
     /usr/local/var/lib/couchdb /usr/local/var/log/couchdb /usr/local/var/run/couchdb \
   && mkdir -p /var/lib/couchdb \
   && sed -e 's/^bind_address = .*$/bind_address = 0.0.0.0/' -i /usr/local/etc/couchdb/default.ini
\
-  && sed -e 's/\/usr\/local\/var\/log\/couchdb\/couch.log$/\/dev\/null/' -i /usr/local/etc/couchdb/default.ini
+  && sed -e 's!/usr/local/var/log/couchdb/couch.log$!/dev/null!' -i /usr/local/etc/couchdb/default.ini
 
 COPY ./docker-entrypoint.sh /
 


Mime
View raw message