I have a web application written in Java and running on a host. It runs fine, using spark (model and view, service, velocity, and of course ignite). I am trying to put the application in a docker image based on amazoncorretto:8, but when it runs on the same host, it tells me java.lang.IllegalStateException: no valid keystore.

According to the documentation, Corretto does have a store (/usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/security/cacerts)

I tried adding these lines to the Dockerfile (because this is how it looks on the host):
RUN mkdir -p /etc/ssl/certs
COPY di.* /etc/ssl/certs (di.* are the key and crt that I'm using)
But this doesn't help. Does it mean I have to create a keystore? Can I map an external /etc/ssl/certs folder to the docker? Will it help?

0

There are 0 best solutions below