-1
I have a java application with spring boot and mysql, I put my application running in Docker container but I don’t want mysql to be in Docker.
The problem is that I am not getting my application to connect to mysql that is installed on the host.
follows my Dockerfile:
FROM adoptopenjdk/openjdk11:latest
RUN mkdir /etc/app
VOLUME /tmp
COPY app.jar /etc/app
COPY application.properties /etc/app
COPY application-prod.properties /etc/app
ENTRYPOINT [ "java" , "-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=prod", "-jar" ,"/etc/app/app.jar"]
I wonder if it’s possible
Have you ever worked with Docker-Composer? If not, try to make your connection through Docker-Compose.yml
– Eduardo Gonçalves