Running automated test: failed to resolve host: 'emulator': Temporary failure in name resolution

running automated test i get the following error which does not show if below docker-compose file is running locally

full docker-compose.test and docker file here

Log:

2024-01-31T23:43:39Z + sleep 50
2024-01-31T23:44:28Z + more /etc/resolv.conf
2024-01-31T23:44:28Z ::::::::::::::
2024-01-31T23:44:28Z /etc/resolv.conf
2024-01-31T23:44:28Z ::::::::::::::
2024-01-31T23:44:28Z search ec2.internal
2024-01-31T23:44:28Z nameserver 127.0.0.11
2024-01-31T23:44:28Z options edns0 ndots:0
2024-01-31T23:44:28Z + adb connect emulator:5557
2024-01-31T23:44:28Z * daemon not running; starting now at tcp:5037
2024-01-31T23:44:29Z * daemon started successfully
2024-01-31T23:44:29Z failed to resolve host: 'emulator': Temporary failure in name resolution

Just the top:

networks:
  my-network:
    driver: bridge

services:
  sut:
    build: .
    image: growerp/integration-test
    volumes:
      - ./test:/opt/growerp/test
    depends_on:
      - emulator
    command: bash -c "test/run_tests.sh"
    networks:
      - my-network

  emulator:
    image: growerp/android-emulator
    container_name: emulator
    hostname: emulator
    ports:
      - 5556:5556
      - 5557:5557
    depends_on:
      - moqui
      - chat
    privileged: true
    devices:
      - '/dev/kvm:/dev/kvm'
    command: bash -c "/entrypoint.sh 5556 5557"
    networks:
      - my-network

  moqui:
    image: growerp/growerp-moqui
    container_name: moqui
    restart: always

looking forward for any suggestions how to resolve this?

thanks in advance,
regards.

it looks like the emulator step does not start

does docker hub support the privileged option and the /dev/kvm device?

thanks in advance for your reply.

it looks like kvm is not supported, so cannot run android emulator headless…
looks like GiHub can?

If it works on GitHub, then it indeed seems that way. Do you get any error message in the emulator container or do you have any error from Docker? Docker Hub supports emulation, but it doesn’t need /dev/kvm for that, only qemu as far as I know. If it is not enough fo the android emulator and kvm is not enabled on the machine that Docker Hub gives you to build the image,. it will not work.