Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep empty environment variables as those must be UNSET in container #654

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Jul 4, 2024

environment FOO with no value nor equal sign means "propagate value from user's environment, or unset variable"
So, as we resolve environment, empty value with no matching entry in user's environment MUST not result into removing entry from service definition.
Build args do not follow this rule. --build-arg FOO will propagate user's environment value, but if not set build arg will keep using value set by Dockerfile

fixes docker/compose#11962
supersede #634
see docker/compose#11965

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ndeloof ndeloof marked this pull request as ready for review July 5, 2024 15:34
Copy link
Collaborator

@jhrotko jhrotko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof enabled auto-merge (rebase) July 8, 2024 10:12
@ndeloof ndeloof merged commit 6adefd5 into compose-spec:main Jul 8, 2024
8 checks passed
@ndeloof ndeloof deleted the empty-env branch July 8, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Official expected behavior about default ENV variables set in images and listed in docker-compose manifest
3 participants