adoptium / containers

Repo containing the dockerfiles and scripts to produce the official eclipse-temurin containers.
https://hub.docker.com/_/eclipse-temurin/
Apache License 2.0
216 stars 93 forks source link

[Bug]: dotted environment variables are lost (eclipse-temurin:21.0.2_13-jre) #495

Closed miikeat closed 8 months ago

miikeat commented 8 months ago

Please add the exact image (with tag) that you are using

eclipse-temurin:21.0.2_13-jre

Please add the version of Docker you are running

4.25.2 (129061)

What happened?

Dotted environemt variables are lost when starting eclipse-temurin:21.0.2_13-jre. In comparisson, this works with the previous version eclipse-temurin:21.0.1_12-jre!

This issue looks a lot like the issue described in #415

Relevant log output

> docker run --rm -it -e test.test=123 -e test=123 eclipse-temurin:21.0.2_13-jre env
LANGUAGE=en_US:en
test=123
HOSTNAME=a71b2b7a0e21
HOME=/root
JAVA_VERSION=jdk-21.0.2+13
TERM=xterm
PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG=en_US.UTF-8
JAVA_HOME=/opt/java/openjdk
LC_ALL=en_US.UTF-8
PWD=/

> docker run --rm -it -e test.test=123 -e test=123 eclipse-temurin:21.0.1_12-jre env
test.test=123
HOSTNAME=89649ee3492d
LANGUAGE=en_US:en
JAVA_HOME=/opt/java/openjdk
PWD=/
HOME=/root
LANG=en_US.UTF-8
TERM=xterm
SHLVL=0
LC_ALL=en_US.UTF-8
PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
test=123
JAVA_VERSION=jdk-21.0.1+12
miikeat commented 8 months ago

I just noticed that overwriting the entrypoint of the container fixes the issue:

docker run --rm -it -e test.test=123 -e test=123 --entrypoint env eclipse-temurin:21.0.2_13-jre
PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=c8530c795b30
TERM=xterm
test.test=123
test=123
JAVA_HOME=/opt/java/openjdk
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
JAVA_VERSION=jdk-21.0.2+13
HOME=/root
miikeat commented 8 months ago

From __cacert_entrypoint.sh

miikeat commented 8 months ago

already fixed by #493