-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add CouchDB #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CouchDB #1288
Conversation
6c10a76
to
973785a
Compare
Greetings! Thank you for submitting this. Apologies for taking a month to get you some feedback. It's clear you've done your homework, which is appreciated. I successfully built the image and put it through some basic smoke testing. I saw that there is an official PPA that only includes the latest stable release, and that your Dockerfile builds from source. I wonder if you've tried the PPA route or know if CouchDB upstream has an opinion on the matter. The 2.0* images which perform git clone and build the latest revision won't work for an official image. The Dockerfile needs to be reproducible, and while bleeding edge betas/RCs/etc that have a unique git hash reference can be supported, building from master should be done in a non-official image. One of the features of CouchDB is around supporting distributed setups for performance/redundancy. I wonder what would be needed to make that work in a Docker context or if you've explored that topic. Some nitpicks on the Dockerfile: The permissions |
Thanks for the feedback, Peter :) Where do I find the "official" PPA you're referring to? I'm not aware of one. Concerning 2.0 images: I can use git hashes. That shouldn't be a problem and totally makes sense. I'll address your points about the Dockerfile. Thanks :) I'll look into the signal behavior. Do you think we should allow configuration of admin user and password via environment vars? I've seen other database images do that. |
The PPA is at https://launchpad.net/~couchdb/+archive/ubuntu/stable What I meant about reproducible builds and git hashes regarding 2.x is that we can't support checking out master as part of the build, but we would support checking out something like a 2.0-RC1 tag (via git hash, which is actually unique/permanent). Unless there are tags like this to refer to, then we are left with a CI-style build that just grabs the latest code, which I don't think is appropriate. While something like daily/weekly builds could work, I would prefer to avoid that and just publish supported releases and maybe beta/RC that have specific version tags from upstream. CI-style builds are better suited to advanced users and testers who are running on the bleeding edge for a specific purpose -- not usually what gets published as an official repository. Hope this helps clarify. I would recommend disabling logging except to stdout and removing both the ETC and LOG related volumes. It should be a quick blurb in the docs to inform users on how to pass in their own configuration via a volume, or by extending the image. Every Yes, I believe being able to specify user/password via environment vars would be useful. I haven't dug in to the image much yet other than play with the /_util/ endpoint manually, so I'd recommend thinking about the common use cases and what would be helpful to specify via environment variables. |
(that PPA is linked to from https://couchdb.apache.org/#download 😄 )
|
So should I base the image on ubuntu and use the PPA? |
I'd say that depends on what upstream recommends -- in this case, it looks
like upstream does recommend using the Ubuntu packages for Linux users, but
you'd likely know much better than I would (I'm just trying to guess based
on the website). 😄
|
f081dc9
to
2cb61c1
Compare
So I took care of some of the things:
Signal handling is still puzzling to me. CouchDB responds to Anyways, thanks for your feedback so far :) |
I made a PR with some recommendations in klaemo/docker-couchdb#44. Other comments: We expect to see some docs with a PR to https://github.com/docker-library/docs/; which is how the content on the Docker Hub gets filed in (mostly just need to make a As far as the responding to $ docker run -d --name couch couchdb
$ docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1dc512e8e4d9 couchdb "/docker-entrypoint.s" 8 minutes ago Up 8 minutes 5984/tcp couch
$ docker kill -s INT couch
$ docker ps -lq
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1dc512e8e4d9 couchdb "/docker-entrypoint.s" 15 minutes ago Up 15 minutes 5984/tcp couch
$ # still running! |
Thanks for your feedback @yosifkit :) Would you mind taking a look at klaemo/docker-couchdb#45? It adds |
wrt to this becoming an "official" image, perhaps we should have it under apache/couchdb ? Not sure if its possible to have both. |
@dch there already is https://github.com/apache/couchdb-docker for that purpose which will become the single source of truth for the couchdb docker stuff. For details see https://github.com/klaemo/docker-couchdb/issues/22#issuecomment-159381133 |
ping @klaemo, could we get an update of the commit hashes here? The latest Dockerfile looks good to me. 👍 One new thought, would this work better to be |
@yosifkit I had the same thought about erlang yesterday, but the images are incredibly huge ( Is it okay to include https://github.com/klaemo/docker-couchdb/blob/master/1.6.1-couchperuser/Dockerfile with the official image? It's the same CouchDB but with a useful plugin pre-installed. |
btw I force pushed the latest commit hashes |
The couchperuser image seems like a fine variant to add; if that is what you guys want to support. You'll need to update its |
Done. Added sha256 verification and changed I'll prepare a PR for the docs tomorrow. |
Nice! 🎉 It all looks good to me. I would document how users would save their own log file since it logs to cc @tianon for final review as well. Build test of #1288; 53419b9 ( $ bashbrew build "couchdb"
Cloning couchdb (git://github.com/klaemo/docker-couchdb) ...
Processing couchdb:latest ...
Processing couchdb:1.6.1 ...
Processing couchdb:1.6 ...
Processing couchdb:1 ...
Processing couchdb:1.6.1-couchperuser ...
Processing couchdb:1.6-couchperuser ...
Processing couchdb:1-couchperuser ...
$ bashbrew list --uniq "$url" | xargs test/run.sh
testing couchdb:latest
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
testing couchdb:1.6.1-couchperuser
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed |
VOLUME ["/usr/local/var/lib/couchdb"]
WORKDIR /var/lib/couchdb Shouldn't these two paths be the same? Which one is correct? 😄 |
(the entrypoint then also references the path in |
Other than that and the point about |
@tianon the paths are correct (as per https://cwiki.apache.org/confluence/display/COUCHDB/Debian) .
|
Just opened a PR for the documentation. |
LGTM, Build test of #1288; 53419b9 ( $ bashbrew build "couchdb"
Cloning couchdb (git://github.com/klaemo/docker-couchdb) ...
Processing couchdb:latest ...
Processing couchdb:1.6.1 ...
Processing couchdb:1.6 ...
Processing couchdb:1 ...
Processing couchdb:1.6.1-couchperuser ...
Processing couchdb:1.6-couchperuser ...
Processing couchdb:1-couchperuser ...
$ bashbrew list --uniq "$url" | xargs test/run.sh
testing couchdb:latest
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
testing couchdb:1.6.1-couchperuser
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed |
LET'S FINISH THIS |
🎉🎉 Thank you :)
|
Congratulations. On 25 February 2016 at 10:17, Clemens Stolle [email protected]
|
Hey there,
I'm the CouchDB Docker person and I'd like to add an official CouchDB image to the registry.
It is based on the popular klaemo/couchdb image.
Let me know, if you need me to change anything.
Thanks for reviewing.