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

Always assume Linux for host OS #543

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

guineveresaenger
Copy link
Contributor

@guineveresaenger guineveresaenger commented Mar 14, 2023

It turns out even Windows builds for Linux by default when using Docker.
This PR leaves the logic for architecture, but defaults to use Linux as the platform OS.

Fixes #534

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Member

@AaronFriel AaronFriel left a comment

Choose a reason for hiding this comment

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

This LGTM, I would not want to spend too much time diving into the Docker CLI.

Comment on lines +128 to 131
// OS defaults to Linux in all cases
os := "linux"
arch := runtime.GOARCH
hostPlatform := os + "/" + arch
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we could peek into the moby/moby repo or docker/cli and see what their logic is. If they infer a platform value, should we import their method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! I did verify that on macOS with an empty platform string, the daemon does assume reasonable OS defaults, i.e. linux on macOS.

@guineveresaenger guineveresaenger merged commit c6847aa into master Mar 15, 2023
@guineveresaenger guineveresaenger deleted the guin/default-platform-windows branch March 15, 2023 16:41
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.

Consider default platform selections, windows/amd64 may not be the best default on Windows
2 participants