Kafka access inside and outside docker

前端 未结 3 1070
遥遥无期
遥遥无期 2020-12-18 00:22

I\'m trying to start a kafka service using docker-compose, and it should be able to be accessed inside and outside docker. So, it should be matter of setting the right adver

3条回答
  •  隐瞒了意图╮
    2020-12-18 00:59

    Agreed to the answer from @Robin Moffatt that outside port 9094 is mapped to container's 9092.

    In addition to removing that configuration from docker-compose.yml, the outside port 9094 should be mapped to container's 9094.

    ports:
      - "9094:9094"
    

    PS: I couldn't add this as a comment to previous answer, hence adding it as a new answer.

提交回复
热议问题