1

In my ubuntu 18.04, installed couch db using this repo. In order to data persistance, i have created docker volume using the command docker volume create --name couchdbvolume.

I used docker run -p 5984:5984 -d couchdb -v couchdbvolume:/opt/couchdb/data --name some-couchdb command to create new docker process. Instead of using existing volume, every time docker creates new volume. So i loss data in every restart.

As per this question , un-named volumes are created if the docker file doesn't have name in volume keyword. I think because of this line the volume doesn't have name. so it creates un-named volume.

Instead of multiple docker volume, I expect, only one docker volume(i have only one couchdb docker image)

1
  • Weird request, but could you check if changing the order of arguments resolve the issue? put the image name at the end of the command: docker run -p 5984:5984 -d -v couchdbvolume:/opt/couchdb/data --name some-couchdb couchdb Commented Feb 4, 2019 at 19:59

1 Answer 1

1

According to the documentation, options should precede the image name.

$ docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]

please try the following: docker run -p 5984:5984 -d -v couchdbvolume:/opt/couchdb/data --name some-couchdb couchdb

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.