Refused connection to RabbitMQ when using docker link
问题 I have a microservices application which has two services and a rabbit mq used as a message queue for communication between them. Now, I want to deploy them on docker. I have the following code in the docker-compose.yml file: version: "3" services: rabbitmq: build: ./Rabbit hostname: "rabbitmq" container_name: "rabbitmq" environment: RABBITMQ_ERLANG_COOKIE: "cookie" RABBITMQ_DEFAULT_USER: "user" RABBITMQ_DEFAULT_PASS: "pass" RABBITMQ_DEFAULT_VHOST: "/" ports: - "15672:15672" - "5672:5672" #