Closed flesser closed 3 months ago
The environment variable JAVA_HOME is missing on the amazoncorretto-8-debian:
JAVA_HOME
amazoncorretto-8-debian
docker run --rm -it maven:3.9.6-amazoncorretto-8-debian bash -c 'echo $JAVA_HOME' # no output
In contrast, it is present in the Amazon Linux version:
docker run --rm -it maven:3.9.6-amazoncorretto-8 bash -c 'echo $JAVA_HOME' /usr/lib/jvm/java-1.8.0-amazon-corretto
I guess it's because https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8/Dockerfile inherits this env var FROM amazoncorretto:8 while https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8-debian/Dockerfile installs a *.deb into a plain debian:slim which does not seem to export this variable permanently.
FROM amazoncorretto:8
I did not check if other Versions (Java >8) have the same issue, but probably.
FYI @anirbanmu
Thanks for the heads up @carlossg, I hope try to add it soon.
The environment variable
JAVA_HOME
is missing on theamazoncorretto-8-debian
:In contrast, it is present in the Amazon Linux version:
I guess it's because https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8/Dockerfile inherits this env var
FROM amazoncorretto:8
while https://github.com/carlossg/docker-maven/blob/main/amazoncorretto-8-debian/Dockerfile installs a *.deb into a plain debian:slim which does not seem to export this variable permanently.I did not check if other Versions (Java >8) have the same issue, but probably.