I have a rest api mounted on Springboot, and this is inside a docker container, the issue is that I want to connect to my local database, but it does not connect me, if someone knows what I can do, I appreciate it
docker-compose.yml
version: "3.7"
services:
app:
image: "bm_spring_boot:latest"
build:
context: ./BmApiRestV2/
dockerfile: Dockerfile
container_name: api_spring
ports:
- 8888:8080
environment:
- SPRING_DATASOURCE_URL=jdbc:oracle:thin:@//localhost:1521/xe
- SPRING_DATASOURCE_USERNAME=system
- SPRING_DATASOURCE_PASSWORD=root
networks:
spring-net:
aliases:
- spring-host
networks:
spring-net:
driver: bridge
ipam:
driver: default
exception
IO Error: The Network Adapter could not establish the connection (CONNECTION_ID=ZXya/2jARQOjulME/+D4hA==)