Skip to content

[Bug]: dotted environment variables are lost #415

Closed
@yosifkit

Description

@yosifkit

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

eclipse-temurin:11-jdk-focal

Please add the version of Docker you are running

Docker version 24.0.5, build ced0996

What happened?

Environment variables are lost and unavailable to the java process.

From the related issue in the Tomcat image:

we have noticed that since about 2 days our java servlet cannot read environment variables which have a "." in the name.

Short example:
System.getenv("variable.with.a.dot") returns null

where
System.getenv("variablewithoutdot") returns the correct variable value.

We set the environment variables via the docker compose .env file.

The timing corresponds to the dependent image rebuilds caused by docker-library/official-images#15162. We haven't made changes to the Tomcat Dockerfiles since July 10.

This has the same root cause as we had in docker-library/tomcat#77. sh removes env vars it doesn't support (ones with periods), but bash does not. The new entrypoint from #392 is sh on Ubuntu and Alpine images and so loses variables. Please change all the entrypoint scripts to use bash

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions