I have an springboot java app inside docker that needs to access an external mysql.
How can I configure this? Is it possible to define it inside Dockerfile?
I am now to docker so I assume this should be a simple and common task :)
When I run the app I receive the error
2019-02-12 15:10:51,472 DEBUG [main] com.zaxxer.hikari.pool.HikariPool: HikariPool-1 - Cannot acquire connection from data source java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
FROM openjdk:11.0.2-jre-slim VOLUME /tmp COPY target/app-0.4-SNAPSHOT.jar app.jar ENTRYPOINT ["java","-jar","/app.jar"] EXPOSE 9001/tcp