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
Ability to run Earthly on an M1 computer that uses a remote x86 Docker #1895
Comments
Possible workaround
|
We actually already expose this information, too! Its in this structure: earthly/util/containerutil/types.go Lines 53 to 62 in b0e5a0f
And you get it (regardless of frontend) with this method on a given frontend: earthly/util/containerutil/frontend.go Line 21 in b0e5a0f
Implementations:
|
Oh great - that's really useful! |
Note that interactive mode might not work immediately in this setup and more tinkering may be necessary. Also, we should test that local registry-based outputs still work fine in this case. |
Digging into the problem more I believe @alexcb is correct and we need to use that frontend information.
The below shows the second assumption is not true either.
|
fixes #1895 Running Earthly from an M1 mac to a remote docker host running x86 was broken as described in the issue. We need to ensure an appropriate image is pulled that is. compatible with the architecture the docker host itself. The solution is to use the frontend information we collect via the `Information` call to determine if the current client's platform also works on the server. If it is supported, this acts as a sort of preference to the client's platform. If not, it will default to the server platform to allow the buildkitd container to Co-authored-by: Vlad A. Ionescu <446771+vladaionescu@users.noreply.github.com>
Setup
Problem
User wants to run Earthly locally, but as Earthly attempts to start the buildkit daemon in Docker, it pulls the arm64 version of the image, instead of the x86 version of it. This causes a crash as buildkit cannot be emulated.
What should happen instead
The text was updated successfully, but these errors were encountered: