Here is my project
https://github.com/haseeb1988/spRegistration.git
// Creating network
docker network create -d bridge sp-sql-net
// build images
docker build -t springboot_website .
//run container
docker run --network sp-sql-net --name springboot_mysql_container_rest -p 8080:8080 springboot_website
Problem:
I’m encountering an issue with my application. It works perfectly on my local machine, connecting to a MySQL database running in a Docker container. However, when I try to run my application inside a Docker container while using the same MySQL container, the application fails to start. I’ve tried both Docker commands and Docker Compose, but neither approach resolves the problem. Any insights or suggestions would be greatly appreciated!
I’ve tried both Docker commands and Docker Compose, but neither approach resolves the problem. and i am expecting solution.
mohammad haseeb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.