docker-fbctf icon indicating copy to clipboard operation
docker-fbctf copied to clipboard

error: nc: getaddrinfo: Name or service not known

Open ghost opened this issue 3 years ago • 1 comments

I got a error when I docker run the image:lasted.

nc: getaddrinfo: Name or service not known waiting for mysql to start

and i foud the file entrypoint.sh wite the code: # Wait for the mysql container to be ready while ! nc -z mysql 3306; do echo "Waiting for mysql to start"; sleep 1; done;

below is console dump nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known Waiting for mysql to start nc: getaddrinfo: Name or service not known

ghost avatar Aug 14 '21 03:08 ghost

This sort of error usually comes when one container does not know the "hostname" of the other. When deploying be sure to either use links or container networks.

denzuko avatar Feb 28 '24 09:02 denzuko