Docker Community Forums

Share and learn in the Docker community.

Connecting to an existing Oracle DB from a container

This is probably a beginners question but I would like to “containerize” my app (it just so happens that it is a web app) but the app either directly makes queries to the database or indirectly through EntityFramework. I would like to use the connection strings to the Oracle DB as is from within the container. Is this possible?

I am also using “older” ASP.NET MVC technologies so the app that I am trying to “containerize” would be a Windows container.

Your question is a little confusing. I’m assuming you’re asking how to connect your containerized app to your existing database (if not, sorry for possibly being redundant).

They short answer is, you access it the exact same way your non-containerized app accessed it. Just make sure whatever resources that you currently require (access to network sockets, files, permissions, etc…) are available to the container. The longer answer depends on how your actually accessing the database in your non-containerized application.