Docker links with awsvpc network mode

后端 未结 2 1501
野性不改
野性不改 2021-01-15 10:27

I have a Java webapp deployed in ECS using the tomcat:8.5-jre8-alpine image. The network mode for this task is awsvpc; I have many of these tasks running across 3 EC2 instan

2条回答
  •  暖寄归人
    2021-01-15 10:35

    You dont need the linking part at all, because awsvpc allows you to reference other containers simply by using

    localhost:8080 (or whatever port is your other container mapped to)

    in your nginx config file.

    So remove links from your json and use localhost:{container-port} in nginx config. Simple as that.

提交回复
热议问题