The container can't reach the database — now what?
Service-to-service network problems are the second-most-common debugging category. Don't install diagnostic tools into your application image. Use a dedicated debug image — nicolaka/netshoot is the canonical choice and ships with curl, dig, nslookup, tcpdump, mtr, and friends.