Docker Community Forums

Share and learn in the Docker community.

Couchdb on docker setup on Windows

I have a docker installation on a Windows machine. I want to setup a couchdb instance on that. I wrote a script which has been tested and runs on Linux. Now I am doing the same on a docker setup on Windows.

I am running the following script:

docker run -p 5984:5984 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password -d -v /couchdb/etc:/opt/couchdb/etc/local.d couchdb:latest

I see a couple of issues:

  1. I get the error:docker: Error response from daemon: invalid bind mount spec “/couchdb/etc:/opt/couchdb/etc/local.d”: invalid volume specification: ‘\couchdb\etc:\opt\couchdb\etc\local.d’.

Do note that the same thing worked for me on Linux. Here it is not able to recognize this mount. Note: Here, I first specified an absolute Windows path: “C://code//couchdb//etc” but I searched a bit and someone suggested using a path with reference to where you are running the script from. I did that, but still see this error.

  1. I decided to eliminate the volume part completely and then ran the script:

docker run -p 5984:5984 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password -d couchdb:latest

I still see an error:

Unable to find image 'couchdb:latest' locally
latest: Pulling from library/couchdb
C:\Program Files\Docker\docker.exe: no supported platform found in manifest list.
See 'C:\Program Files\Docker\docker.exe run --help'.

I already did docker login, but not sure why I see this error. From a google search and for the description itself, it sounds like there is no couchdb image available for this docker?

The sme thing worked on Linux. Does this mean that a Linux docker image has to be created only from a docker setup on another Linux machine?

I have a bunch of Linux docker images that I want to test on a docker setup on Windows. Will this even work? I thought it should not matter as long as there is a docker setup available - irrespective of the underlying OS.

Please clarify.

Thanks in advance.


Addition: I was also trying to setup one more docker container and when I ran that, I got the following error:

unknown flag: --mount

This is the command I ran:

docker run -p 8080:8080 -d --restart always --mount source=mydb,target=/opt/jboss/myapp/standalone/data myapp:latest

The above command worked well on Linux too, but it looks like on Windows, it is not possible to mount volumes this way.