Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
This is expected as you cannot have two services listening on the same port. If you want to run two different instances of mongodb, they will have to listen on different ports. Perhaps you just have your ports swapped in your https://docs.docker.com/reference/cli/docker/container/run/#publish |
Beta Was this translation helpful? Give feedback.
-
$ sudo docker run -d -p 27017:27018 --name=mongo-example mongo:latest
Unable to find image 'mongo:latest' locally
latest: Pulling from library/mongo
Digest: sha256:54f906f0ed3092d65237ff01d22023f43ad60a6872be98234aca24abcbabac14
Status: Downloaded newer image for mongo:latest
d23655566f7548a1c6ce706776d45a889ca03cc393da4208c83ad0d55cb3fe66
docker: Error response from daemon: driver failed programming external connectivity on endpoint mongo-example (e7c7b331af185963952ed4e978e6164f489ffc0fdc8da721d35bd127de9987b3): Error starting userland proxy: listen tcp4 0.0.0.0:27017: bind: address already in use.
Beta Was this translation helpful? Give feedback.
All reactions