docker-fbctf
docker-fbctf copied to clipboard
error: nc: getaddrinfo: Name or service not known
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
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.