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: add image with couchperuser plugin
Date Tue, 26 Jan 2016 14:19:13 GMT
Repository: couchdb-docker
Updated Branches:
  refs/heads/master 38ea04c61 -> 8a7e8c7e2


add image with couchperuser plugin


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

Branch: refs/heads/master
Commit: 8a7e8c7e2eae3577708bc95f4b1b11a5f1e56702
Parents: 38ea04c
Author: klaemo <klaemo@fastmail.fm>
Authored: Tue Jan 26 15:18:10 2016 +0100
Committer: klaemo <klaemo@fastmail.fm>
Committed: Tue Jan 26 15:18:10 2016 +0100

----------------------------------------------------------------------
 1.6.1-couchperuser/Dockerfile           | 23 ++++++++++++++++++
 1.6.1-couchperuser/docker-entrypoint.sh | 35 ++++++++++++++++++++++++++++
 README.md                               |  9 +++++++
 3 files changed, 67 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-docker/blob/8a7e8c7e/1.6.1-couchperuser/Dockerfile
----------------------------------------------------------------------
diff --git a/1.6.1-couchperuser/Dockerfile b/1.6.1-couchperuser/Dockerfile
new file mode 100644
index 0000000..e509f39
--- /dev/null
+++ b/1.6.1-couchperuser/Dockerfile
@@ -0,0 +1,23 @@
+# 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.
+
+FROM klaemo/couchdb:1.6.1
+
+MAINTAINER Clemens Stolle klaemo@apache.org
+
+RUN apt-get update && apt-get install -y rebar build-essential \
+ && mkdir -p /usr/local/lib/couchdb/plugins/couchperuser \
+ && cd /usr/local/lib/couchdb/plugins/couchperuser \
+ && curl -L https://github.com/etrepum/couchperuser/archive/1.1.0.tar.gz | tar -xz
--strip-components=1 \
+ && make \
+ && apt-get purge -y rebar build-essential \
+ && apt-get autoremove -y

http://git-wip-us.apache.org/repos/asf/couchdb-docker/blob/8a7e8c7e/1.6.1-couchperuser/docker-entrypoint.sh
----------------------------------------------------------------------
diff --git a/1.6.1-couchperuser/docker-entrypoint.sh b/1.6.1-couchperuser/docker-entrypoint.sh
new file mode 100755
index 0000000..ba4dac3
--- /dev/null
+++ b/1.6.1-couchperuser/docker-entrypoint.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# 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.
+
+set -e
+
+if [ "$1" = 'couchdb' ]; then
+  # we need to set the permissions here because docker mounts volumes as root
+  chown -R couchdb:couchdb \
+    /usr/local/var/lib/couchdb \
+    /usr/local/var/log/couchdb \
+    /usr/local/var/run/couchdb \
+    /usr/local/etc/couchdb
+
+  chmod -R 0770 \
+    /usr/local/var/lib/couchdb \
+    /usr/local/var/log/couchdb \
+    /usr/local/var/run/couchdb \
+    /usr/local/etc/couchdb
+
+  chmod 664 /usr/local/etc/couchdb/*.ini
+  chmod 775 /usr/local/etc/couchdb/*.d
+  exec gosu couchdb "$@"
+fi
+
+exec "$@"

http://git-wip-us.apache.org/repos/asf/couchdb-docker/blob/8a7e8c7e/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 4ad1764..df5fae1 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,15 @@ curl http://localhost:5984
 If you want to provide your own config, you can either mount a directory at `/usr/local/etc/couchdb`
 or extend the image and `COPY` your `config.ini` (see [Build you own](#build-your-own)).
 
+### with couchperuser plugin
+
+This build includes the `couchperuser` plugin.
+`couchperuser` is a CouchDB plugin daemon that creates per-user databases [github.com/etrepum/couchperuser](https://github.com/etrepum/couchperuser).
+
+```
+[sudo] docker run -d -p 5984:5984 --name couchdb klaemo/couchdb:1.6.1-couchperuser
+```
+
 ## Run (dev)
 
 Available on the docker registry as [klaemo/couchdb:2.0-dev](https://index.docker.io/u/klaemo/couchdb/)


Mime
View raw message