Docker Community Forums

Share and learn in the Docker community.

Creting Dockers for mutliple microservices i dont want to use --network="host"

sample docker file attached with
after building image with docker file running same image with

docker run --network=“host” --rm docker_imagename

first service properly bind with ip but foe second and reset docker run not working failed to bind tcp error

Error:–3:52:17.965 [info] akka.event.slf4j.Slf4jLogger - Slf4jLogger started
03:52:18.124 [info] akka.remote.Remoting [sourceThread=main, akkaSource=akka.remote.Remoting, sourceActorSystem=application, akkaTimestamp=03:52:18.120UTC] - Starting remoting
03:52:18.486 [error] akka.remote.transport.netty.NettyTransport [sourceThread=application-akka.remote.default-remote-dispatcher-6, akkaTimestamp=03:52:18.482UTC, akkaSource=NettyTransport(akka://application), sourceActorSystem=application] - failed to bind to /127.0.1.1:2552, shutting down Netty transport

Working:-for first instance log
05:17:40.383 [info] akka.cluster.singleton.ClusterSingletonProxy [sourceThread=application-akka.actor.default-dispatcher-5, akkaTimestamp=05:17:40.382UTC, akkaSource=akka.tcp://application@127.0.1.1:2551/user/cassandraOffsetStorePrepare-singletonProxy, sourceActorSystem=application] - Singleton identified at [akka://application/user/cassandraOffsetStorePrepare-singleton/singleton]
05:17:40.831 [info] akka.cluster.singleton.ClusterSingletonProxy [sourceThread=application-akka.actor.default-dispatcher-5, akkaTimestamp=05:17:40.831UTC, akkaSource=akka.tcp://application@127.0.1.1:2551/user/readSideGlobalPrepare-AuthEventProcessor-singletonProxy, sourceActorSystem=application] - Singleton identified at [akka://application/user/readSideGlobalPrepare-AuthEventProcessor-singleton/singleton]
05:17:41.757 [info] play.core.server.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:49152

Note:—Need to understnad for my project which docker network topology should i use