Comments (11)
What is the expected behaviour? Does this work out of the box with docker for mac?
I was able to get it to run successfully by having multiple nodes as per the instruction on https://docs.docker.com/buildx/working-with-buildx/.
Steps
Note:
The following commands are not available until the next release of Colima, which supports multiple instances and docker contexts. For now you can build from source or brew install --head colima
1. Create instances for the two architectures.
The instance with non-native architecture will run noticeably slower. This is expected as the processor is being emulated by qemu.
Create an instance for amd64/x86_64 architecture
colima start --profile amd --arch amd
Create an instance for arm64/aarch64 architecture
colima start --profile arm --arch arm
2. Create a buildx context to use the created instances as nodes.
Step 1 (if successful) should create colima-amd
and colima-arm
docker contexts. Specify them in the new buildx context.
docker buildx create --use --name custom colima-amd
docker buildx create --append --name custom colima-arm
3. Run docker buildx build
Everything should be fine now and running docker buildx build
should work as desired.
from colima.
Though this is still a valid approach #44 (comment), multiple instances are no longer required. You can reverse those steps.
Kindly update to the latest development version brew install --head colima
and start colima (or restart if running). Multi-architecture support should now be there out of the box.
Running images of different architectures should work fine. e.g.
docker run --rm --platform linux/amd64 alpine
docker run --rm --platform linux/aarch64 alpine
Using docker buildx build
requires at most one step.
# this is assuming default profile,
# otherwise the name would be `colima-<profile>` e.g. `colima-arm`.
docker buildx create --use colima
from colima.
Any idea what would cause this on the m1?
from colima.
Thanks for taking a look! I gave this a try and it seems to be working well.
FWIW it does in fact work with 0 modifications when using Docker Desktop. Using this as a solution is perfectly fine though.
from colima.
If that is the case, Docker Desktop handles it internally for better user experience.
I will revisit this later.
from colima.
I have found a proper solution to this that would require almost no setup from the user :)
Will push a fix soon.
from colima.
Excellent! I look forward to testing it. FWIW I am having good luck with Colima on my Intel Mac mini and my M1 powered MBA.
from colima.
@gayanhewa @goshlanguage this should no longer happen as cross-architecture is supported (though limited).
More complex images like java jvm or mssql-server may not behave correctly but most of the amd64 images will work fine on M1.
Nonetheless, it is better and recommended to use the arm64 images instead.
from colima.
I will be closing as this is not really a Colima issue.
from colima.
Confirmed, this is working perfectly for me and I am able to build and run multi-arch images just like before! Nice work!
from colima.
Any idea what would cause this on the m1?
@gayanhewa m1s use arm64
architecture, not amd64
as shown in your screenshot. Your CPU doesn't know how to talk amd64
so when you try to run that specifically, it can't, resulting in exec format error
from colima.
Related Issues (20)
- Colima not getting install on Mac M1 HOT 2
- Colima can not run with arch x86_64 HOT 6
- colima is not exposing IP address with option --network-address HOT 2
- warning message on `colima start` HOT 2
- warning messages during `colima start` disappear and can't be acted on
- kubernetes longhorn - failed to try resolving symlinks
- Can't use rosetta for x86_64? HOT 2
- No IP address with --network-address after upgrading to macOS 13.5.2 HOT 2
- All containers and images are gone after colima reinstallation HOT 2
- Colima can't access the internet, i/o timeout
- Cannot install colima-bin with yay on arch linux
- Connection timeout for kubectl commands
- `dynamic disk resize not supported for VZ driver, ignoring...` HOT 1
- Starting x86 docker fails after Sonoma upgrade
- lima and other informational output invisible on dark terminal background HOT 1
- Lima upgrade breaks DNS on existing VMs HOT 2
- Colima seems to prevent sleep / causes significant power drain (esp during sleep) HOT 1
- Mounting does not work if files are located in a volume HOT 1
- fail to start kubernetes with error: error at 'updating config': error fetching kubeconfig on guest: cannot read file: /etc/rancher/k3s/k3s.yaml HOT 1
- Don't disable QEMU emulation if it doesn't exist?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colima.