To connect to a GCP database not accessible through internet, you need to pass through a proxy provided by GCP. To do so you need to use this command by replacing ${INSTANCE_NAME} by your proxy instance name and ${OTHER_INSTANCE_NAME} by your database instance name.
docker run -it --rm \
-u "$(id -u):$(id -g)" \
-v "$HOME/.config/gcloud/application_default_credentials.json:/config/gcloud/application_default_credentials.json" \
-p 127.0.0.1:3307:3306 \
gcr.io/cloudsql-docker/gce-proxy:latest \
/cloud_sql_proxy \
-instances=${INSTANCE_NAME}:europe-west1:${OTHER_INSTANCE_NAME}=tcp:0.0.0.0:3306 \
-credential_file=/config/gcloud/application_default_credentials.json