MySQL server is not available during Dockerfile build?
zohar
TRIALOP

a year ago

The docs state that if I reference DB variables in another service, then I can expect the DB to be available when I build my service.
However, in my (failed) build log I get the following error:

Failed to connect to your database server. The server reports the         
     following message: /SQLSTATE[HY000] [2002] php_network_getaddresses:      

     getaddrinfo for mysql-toge.railway.internal failed: Name or service not   
     known [Tip: This message normally means that there is no MySQL server     
     running on the system or that you are using an incorrect host name or port

The address is correct, so it means the DB service is indeed up, but it seem to be unavailable to my web service.
Important to note that if I build the app without trying to connect to the DB, then deployment is flawless, and the connection during run time works just fine.

What could it be?

Solved

4 Replies

zohar
TRIALOP

a year ago

665700e5-7078-4a17-bd42-00e3b59c1a0f


a year ago

the internal network is indeed not avaiable during build


a year ago

sorry let me be clear, the database is available, just not via the private network, public network only


a year ago

!s


Status changed to Solved brody about 1 year ago


Loading...