Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 537EB1799D for ; Tue, 26 Jan 2016 14:19:13 +0000 (UTC) Received: (qmail 34125 invoked by uid 500); 26 Jan 2016 14:19:13 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 34076 invoked by uid 500); 26 Jan 2016 14:19:13 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 34065 invoked by uid 99); 26 Jan 2016 14:19:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2016 14:19:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0347BE00D6; Tue, 26 Jan 2016 14:19:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: klaemo@apache.org To: commits@couchdb.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: couchdb-docker git commit: add image with couchperuser plugin Date: Tue, 26 Jan 2016 14:19:13 +0000 (UTC) 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 Authored: Tue Jan 26 15:18:10 2016 +0100 Committer: klaemo 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/)