Access managed database (MySQL) over private network from inside a docker container

We run our site using docker on a droplet. I want to use DO’s newly released managed database (DB server) and have created a new cluster and imported the data. Both Droplet and DB cluster have private network enabled.

I can access the DB server from the droplet, but not from within a docker container running on the droplet. What do I need to configure in order for containers to gain access to resources within DO private network.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


I’m not sure if this could be achieved with a standalone private network but I think that you can achieve this now with the new DigitalOcean VPC networks.