I am trying to run multiple containers on a RPI4 and I am using docker-compose file for the definition of the services. Each service seems to be starting ok but seems to be failing when they try to talk to each other. Following is a sample of the definition of a couple of services, and I use the service hostname to refer to the services. Is that supported? I am also seeing errors like the following when trying to access the services:
msg="Error getting ping: Get http://edgex-core-metadata:48081/api/v1/ping: dial tcp: lookup edgex-core-metadata on 127.0.0.11:53: no such host "
Is anything missing in my docker-compose in order to allow the containers in the same network to communicate?
metadata: image: edgexfoundry/docker-core-metadata-go-arm64:1.2.0 ports: - "127.0.0.1:48081:48081" container_name: edgex-core-metadata hostname: edgex-core-metadata networks: - edgex-network environment: <<: *common-variables Service_Host: edgex-core-metadata Notifications_Sender: edgex-core-metadata SecretStore_TokenFile: /tmp/edgex/secrets/edgex-core-metadata/secrets-token.json volumes: - tmp-secrets:/tmp/edgex/secrets depends_on: - consul - mongo - notifications - vault-worker data: image: edgexfoundry/docker-core-data-go-arm64:1.2.0 ports: - "127.0.0.1:48080:48080" - "127.0.0.1:5563:5563" container_name: edgex-core-data hostname: edgex-core-data networks: - edgex-network environment: <<: *common-variables Service_Host: edgex-core-data SecretStore_TokenFile: /tmp/edgex/secrets/edgex-core-data/secrets-token.json volumes: - tmp-secrets:/tmp/edgex/secrets depends_on: - consul - mongo - metadata - vault-worker networks: edgex-network: driver: "bridge"