I have mysql server running in centos host and I want to deploy my war in tomcat inside docker container in same host. Any idea how can I connect mysql from inside the container.
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
Here is what you can do to connect to the DB (mysql) from the App (tomcat). There are two ways you can do this
Example-1 (Links)
Example 2:
If you want to use Host's mysql
Do let me know if you need any further explanation. You can go through the topics on volumes, links from docker documentation: https://docs.docker.com/