Creating Couchbase container in Docker - do I need to explicitly map ports

Docker running on windws, I have couchbase image which I’d like to run, looking at the provided info I should use the following command:
docker run -d --name cb1 -p 8091-8094:8091-8094 -p 11210:11210 couchbase

However, I get an error saying that the 11210 port is already allocated.

So, I run this command instead:
docker run -d --name cb1 couchbase

Now it looks like things are good, however, as I am new to this I wonder what’s the difference between the two commands and should I expect rpoblems, using the shorter command and not mapping those ports explicitly?


Figured it our - had installed Couchbase on host previously - that was causing the conflict…

1 Like

Hi @mkrustev,

I’m glad you figured it out. Just in case someone else comes across this post, all the ports that Couchbase uses are documented here:

Hi @mkrustev, Also take a look at the Couchbase Autonomous Operator for Kubernetes which is best way to run Couchbase on Containers -

Anil Kumar