Can't add replica set to PRIMARY node

contradicts

It is a contradiction because each container is an isolated virtual host. (Italicized because it is a little bit different than a real virtual machine)

It is clearly not OK because you get

So despite the fact that I am not a docker user, I am pretty sure one container cannot access another container using localhost. And each member of a replica set has to connect to every member of the replica set.

I think a little bit of reading about docker and networking might help you:

I also think that you should stick with running non-docker version on your system.

You start all the docker instances from the same host but each docker is a separate entity.

Running all the instances of a replica set on the same physical host using 3 dockers or 3 VMs is foolish and useless because when you loose your physical host you loose your data.

1 Like