Skip to content

builder-next: exporter: emptyImageConfig: use platform directly#48794

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:mobyexporter_use_platform_directly
Oct 30, 2024
Merged

builder-next: exporter: emptyImageConfig: use platform directly#48794
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:mobyexporter_use_platform_directly

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

The OCI image spec now has the platform as field, so we can just set it directly now.

- A picture of a cute animal (not mandatory but encouraged)

The OCI image spec now has the platform as field, so we can just
set it directly now.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code area/builder/buildkit Build labels Oct 30, 2024
@thaJeztah thaJeztah requested a review from tonistiigi as a code owner October 30, 2024 00:16
@thaJeztah thaJeztah added this to the 28.0.0 milestone Oct 30, 2024
Platform: pl,
Config: ocispec.ImageConfig{
WorkingDir: "/",
Env: []string{"PATH=" + system.DefaultPathEnv(pl.OS)},
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

FWIW, DefaultSpec() always sets OS to runtime.GOOS, so I was considering for a second to set that here, but perhaps using the pl.OS is more "correct" here in case DefaultSpec() would ever do some "magic".

@thaJeztah thaJeztah merged commit 85153dd into moby:master Oct 30, 2024
@thaJeztah thaJeztah deleted the mobyexporter_use_platform_directly branch October 30, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/builder/buildkit Build kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants