Skip to content

Conversation

@bradfitz
Copy link
Member

@bradfitz bradfitz commented Jan 5, 2026

This adds support for setting environment variables and fixes two problems
with volume support (merged in #27):

  • if no volumes were specified, it added a bogus "" (empty string) volume
    which made docker fail to run the container
  • if no args were given, volumes were omitted

This also pulls out some common code into a new withPlatformPrefix helper,
and removes some log spam by silently skipping over "unknown" OS layers
in the source image when discovering what OSes to build for.

This adds support for setting environment variables and fixes two problems
with volume support (merged in #27):

* if no volumes were specified, it added a bogus "" (empty string) volume
  which made docker fail to run the container
* if no args were given, volumes were omitted

This also pulls out some common code into a new withPlatformPrefix helper,
and removes some log spam by silently skipping over "unknown" OS layers
in the source image when discovering what OSes to build for.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
@bradfitz bradfitz requested review from irbekrm, raggi and tomhjp and removed request for raggi January 5, 2026 18:53
// Apply the merged env vars
return mutateConfig(img, func(c *v1.Config) error {
c.Env = nil
for _, k := range slices.Sorted(maps.Keys(envMap)) {
Copy link
Member

Choose a reason for hiding this comment

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

win32 abi style :D

Copy link
Member Author

Choose a reason for hiding this comment

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

might as well produce deterministic output, I figured?

I was too lazy to go check whether another layer already did this normalization

@bradfitz bradfitz merged commit 1b65174 into main Jan 5, 2026
1 check passed
@bradfitz bradfitz deleted the bradfitz/env branch January 5, 2026 19:07
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.

2 participants