Imagem Dockerfile obsoleta, mysql obsoleto,java versão obsoleta.
O que tive que alterar para subir
database.sql
Removido GRANT ... IDENTIFIED BY FLUSH PRIVILEGES;
application-prod.properties
Updated driver class to com.mysql.cj.jdbc.Driver.
Added connection options useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC to resolve SSL handshake failures.
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://mysql-forum-api:3306/forum?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
Dockerfile do app
FROM eclipse-temurin:8-jdk-alpine
RUN apk add --no-cache curl
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
ARG JAR_FILE=target/*jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-Xms128M","-Xmx128M","-XX:PermSize=64m","-XX:MaxPermSize=128m","-Dspring.profiles.active=prod","-jar","/app.jar"]