A tiny disclaimer first - I have never used Dockerfile and so far only built my Spring apps with mvn spring-boot:build-image using buildpacks. My wish is to add a certificate into the jre keystore that comes from the volume defined in the compose file below. The volume defined is simply the path to my Nginx/Letsencrypt certs and I would like upon starting the container to run keytool and add some specific certs to this image's java keystore.
The (simplified for clarity) compose file is as follows;
version: '3.3'
services:
bringbackdada:
image: mydogspies/myapp
container_name: myapp
restart: always
expose:
- 8085
networks:
- frontend
volumes:
- "/mnt/data/nginx/certs:/certs"
networks:
frontend:
external:
name: frontend
I have seen that done within a Dockerfile, using RUN to execute whatever application upon container start. But how can I achieve this with Paketo's Java buildpack? I have seen buildpack.yml being mentioned but have not found and examples or even documentation of its syntax.
What is the standard way to add container startup criteria to the Java Paketo buildpack? Or any buildpack for that matter since it all seems to me to be following the same standards?