Skip to content

Do not include secrets in the Docker image

Created by: mbarbero

Please remove lines https://github.com/EclipseFdn/marketplace-rest-api/blob/master/src/main/docker/Dockerfile.jvm#L19-L27

Whatever you use to test the container, you will need to update it to inject a volume.

Also remove -Dconfig.secret.path=${SECRET_LOCATION}/secret.properties from the ENV JAVA_OPTIONS. I'd suggest we leave this as soemthing to be passed when starting the container, e.g.

docker run -it --rm -v ~/production/secrets/marketplace-rest-api:/run/secrets eclispefdn/marketplace-rest-api -Dconfig.secret.path=/run/secrets/very.secret.properties

(or use docker compose secret)

Once you made it work with the docker container on your laptop, I can update the k8s deployment files to make use of kube secrets.