Hi everyone,
I’m currently trying to benefit from the dockerization of CouchDB (thanks for
this, BTW!).
My aim would be to dockerize also our own applications that are based on
CouchDB.
Does any of you have similar experience?
I read in documentation that for custom configurations there are already known
solutions
(runtime bind-mount, docker configs or extending Dockerfile with a COPY).
What is still not clear to me is how to extend CouchDB docker image to include
preset databases
(with design documents and optionally initial data).
In my future Dockerfiles, I will probably use couchapp python tool (for
compatibility with our existing code),
but for now I am trying the simplest thing as possible: just creating a
database with curl.
I wrote the following Dockerfile:
FROM couchdb
RUN curl -X PUT localhost:5984/db
And when I launched the build:
docker build .
I got:
curl: (7) Failed to connect to localhost port 5984: Connection refused
I then thought that the service might be not be ready. Hence I tried to add a
timeout on curl but in vain.
Any idea of why this doesn’t work or about what I should test instead?
Regards,
Aurélien