Not able to connect to postgres container when running spring boot container. I want to do it without using docker-compose
I am trying to docerize my spring boot application which uses posgtres. I am running postgres containter and while running app image spring boot not able to connect the data base. Getting below error. I am not using docker-compose as of now.
Choosen database is not used when using postgresql with docker
I am new to docker.I have written a docker-compose.yaml with following :
Connection refused when connecting spring app and postgres using docker
I’m trying to connect a spring application to a postgres container using docker compose
but I always get this errors: