274 points · by jcollins · 5y ago · 228 comments
[1] - https://www.docker.com/community/get-involved/developer-prev...
Or that’s something you have to infer from the execution speed?
EDIT: If you're asking specifically if you can tell what architecture a running container is using, a simple `docker inspect CONTAINER_ID` should show it.
[1] https://docs.docker.com/engine/reference/commandline/manifes... [2] https://hub.docker.com/_/node
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested #!/usr/bin/env bash
docker ps --format "{{.ID}} {{.Names}}" | while read line; do
read -ra arr <<<"$line"
id="${arr[0]}"
names="${arr[1]}"
arch="$(docker exec "$id" uname -m)"
echo -e "$arch\t$names"
done
Or this one-liner with worse formatting: docker ps --format "{{.Names}}" | xargs -tI {} docker exec {} uname -m> Many developers are going to experience multi-platform development for the first time with the M1 Macs. This is one of the key areas where Docker shines. Docker has had support for multi-platform images for a long time, meaning that you can build and run both x86 and ARM images on Desktop today.
If multi platform images work, a lot of the concerns people have about x86 versus ARM should go away.
Of course, once you can do everything on ARM as well as you can on x86. Perhaps changing more of your infrastructure to ARM might make more sense.
And you look into the dockerfile manifest and see that it wants to pull the whole stack of history of computing...Then you figure maybe you don't need that shiny utility in the first place and move on...
It's "64 vs 32-bit" or "Ubuntu vs Arch vs Fedora binary" all over again...
Until we start seeing reasonably priced, performant ARM desktops and laptops, there is little worry of that. Right now outside Apple, performance on ARM isn't good enough for any kind of great developer experience (or any kind of pro experience). Unless that changes significantly, x86 is going to be dominant on non-Macs for some time.
Personal computers generally go where Windows goes. Heck, that's arguably part of why Apple left PowerPC for Intel in the first place. Apple has tremendous impact on design, form factor, and other visionary steps that the market takes. I do not deny that. Still, in terms of hardware and the development ecosystem, Microsoft simply has a lot more market inertia than does Apple.
This is nothing like 64bit vs 32bit. That was a difficult (MacOS didn't drop 32bit app support until Catalina) but obvious (unless you hate RAM) leap forward. In contrast, Apple Silicon is a leap sideways whose opportunity arose because Intel's flagship process node has had a rough few years. There may be inherent advantages to Apple Silicon as a technology, but nobody should make the unproven assumption that Apple Silicon is universally superior to any and every possible TSMC 5nm x86 chip.
Not really. Just because you have ARM and AMD debian, you wouldn't have same behaviour in both. You wouldn't have same list of packages that can be installed.
I am skeptical that anyone will notice a problem unless their workflow is to build a container on their laptop and push it straight to production without testing.
If 1 in 20 multi-platform images has some kind of oddball cross platform behavior, developers won't be able to rely on them at all. I think we can get far better than that, but we'll see.
i have high hope for AMD/TSMC to push x86. Intel seem to be...stuck for now.
If the industry starts to shift and push towards ARM due to cost, AMD and Intel would be fools to just leave that on the table.
Unless Intel can reboot Moore's Law on Intel, they are going to get hit hard over the next few years. Even if Intel makes the move to ARM, their profitability will take a huge hit from the ARM migration.
In my experience Docker Desktop has been such a resource hog, and Apple's hypervisor implementation pretty poor. I much prefer to have all that heavy lifting isolated away from my development machine to keep it responsive and cool.
> In my experience Docker Desktop has been such a resource hog
Not sure if this is related to the specific project or what, but I haven't had tons of trouble with docker being a big hog.
That said, they are significantly changing the way Docker on M-Series CPUs works, working directly with Apple's Virtualization Framework which I believe improves performance.
https://github.com/docker/for-mac/issues/3499
Some root causes have been addressed. If they are significantly changing the architecture with the Apple Silicon rollout, I'm very much looking forward to see if that improves things!
We build a SaaS web app with a MERN stack deployed to AWS. Local development usually involves running about 12 containers.
Personally, I got fed up and installed Ubuntu 20.04 in Parallels and have been running the Docker containers there for several months. What a night and day difference... the entire VM sits at about 13% CPU when idling, whereas Docker for Mac would whine my fans at around 150% CPU continuously when idling, and spike up to 300+% when clicking around the app.
Regardless, for me the cost of adding enough RAM to support Docker is less than the headache and expense of spinning up Docker images in the cloud.
I also run linux though so resources aren't much of an issue for me. I'm actively considering setting up remote environments for one of my teams that is all mac users working in a containerful dev environment.
I work with other people in teams and I don't get to tune every project I deal with to be just right for my tastes and hardware. So being able to run their stuff as is with emulation is preferable to me having to customize everything before I get to run it.
When I try to spin up kubernetes, the UI just shows 'starting...' while the logs show the image won't work with this architecture.
Anyone else see this? Any workaround?
One solution is re-purposing an old PC into a home-server - once that’s setup, tools like Skaffold start to shine - local network speed, a cool laptop, containerized development, and a platform for home-hosting!
Anyways I’m very excited about this future - much more than paying AWS for another machine!
you might say, "well get a cheaper computer!" but I find that cheaper computers have worse screens, battery life, and overall quality.
But I do agree with you. Cheaper laptops means a worse experience with almost everything.
The M1 MBP is about 15% cheaper, which I guess might be significant to some, but isn’t a huge selling point to me like you’re making it out to be. GP was talking about a 15/16” MBP at $3k, not the 13”.
make change -> compile -> build image -> deploy to k8s
then running docker/k8s remotely would be great but i need great upload bandwidth to be pushing fresh images everytime I make a change. In theory docker layers/caching should fix this but the reality is that you don't add individual files to an image, you had the compiled artifact/bundle/whatevs and if any file changes its going to upload it again, made worse by a change that effects many components/images/k8s pods. If you can solve the upload bandwidth problem (local servers? giant pipe?) then becomes more possible.
What I don't understand is how they are running x86 containers on an ARM64 VM? Docker Desktop still works by building a Linux VM and running Docker there. But the VM would be an ARM VM. So, are they running qemu in the ARM VM to emulate an x86 processor in a nested VM?
I had imagined they'd try to do something like run x86 qemu through Rosetta, but it seems like this is not that. And the Apple Hypervisor Framework documentation leaves a bit to be desired, so I'm not sure if you can switch vCPU architecture, but I highly doubt it. (And I thought it was established that Rosetta wasn't emulating VM instructions).
Can anyone shine any light on this aspect?
https://developer.apple.com/documentation/apple_silicon/abou...
> What Can't Be Translated?: Virtual Machine apps that virtualize x86_64 computer platforms
(How you mention it would be the simplest possible thing that would work)
Which means really, really slow.
I was surprised. You might be surprised, too.
I was so surprised that I decided to only ever run the open source command line docker client on my machine, and to avoid any proprietary software that comes out of Docker Inc in the future. It is absolutely not reasonable for them to upload some of the data that they do, and I no longer trust their judgement about what happens on my machine.
If they did that sort of stuff in the open source cli app, it would be patched out in minutes.
The Docker team is so awesome for getting this out so quickly.
Any proof? As far as I know apple, they are not that developer/open source supportive.
Key takeaway for me is the ability to run/build both x86 and Arm images on a M1.
Can't see any reason M1s can't be used for everyone at my work now. Very nice.
#10 11.95 Starting Installer ...
#10 13.14 qemu: uncaught target signal 11 (Segmentation fault) - core dumpedqemu: uncaught target signal 4 (Illegal instruction) - core dumped
It's a tech preview only and don't screw yourself by thinking you will be able to just jump into your usual workflow without issues.
Good luck docker!
Edit: Docker on Mac has never felt as snappy as on Linux, because of the VM, though I have no hard numbers. Networking is a PITA, but it's not hard to figure out. The other main thing I hate is I have to give up a bunch of RAM to the VM that my containers may or may not use, instead of sharing with the host like on Linux.
It's extremely slow compared to Linux and I'm pointing my fingers at the virtualization layer without any hard evidence because it's the most likely suspect.
With all this focus on sandboxing apps of late, I'm wondering how far the OSX kernel is from having a feature set that resembles cgroups and network namespaces.
Glad to see they are making progress on the M1 port though, my team will be excited.
How is it so many people use docker but have zero fucking clue about how it works?
That it is all so smoothly powered by Linux is what makes it a great product.
Haven't tested it on M1 yet, but I doubt the networking challenges will disappear.
That said, as another person commented, you can run Windows for ARM in a VM on an Apple M1.
Docker Windows containers aren't available on arm64 Windows yet, but stay tuned...
I'm actually using a version of this setup today in order to run Docker on OS X 10.9.
or maybe I moved the goal post to requiring more than 16gb RAM again
but come on everyone you can do it!
edit: guys I'm talking about running Windows on a VM on a M1 macbook. Just going down the checkbox of virtualization options. Docker is one checkbox. Now want Windows and Vmware/VirtualBox/Parallels
Plus Windows also has containers, Docker is only using WSL for Linux images, Windows containers are used for Windows images.
And on Windows Server the containers can run directly on top of Hyper-V as well.
As for 16GB of memory, funny enough I just put out a video today around the topic of "is 16GB of RAM enough for web development?" over at: https://www.youtube.com/watch?v=SQS7XCgUPmc
The video demos running everything I run in my day to day plus more just to see how far 16GB of RAM really goes. It's all running on a Windows 10 workstation I put together in 2014 which has a weak CPU and video card from today's standards, yet everything runs really smoothly.
I never broke 13GB of memory used even with running VMs separate from Docker and heavy duty video editing tools, all while recording a 1080p video at the same time.
For folks who want an M1 and are capped at 16gb of memory, I would imagine the memory usage experience would be similar to that Windows based video. Good enough for most web development, even with a moderate amount of media creation and ops work.
If you mean the regular x86_64 version of Windows, forget it.
Docker Desktop uses qemu, which is the only way you can run an x86_64 OS on an arm64 machine. It can be usable for Linux kernel and command-line applications.
But for Windows, it is very likely that it will be too slow to be usable. People have tried running Windows XP on Raspberry PIs successfully, but it is very slow as expected. https://youtu.be/QQOP29yLOxQ
There's still no word on whether or not apple applications still have exceptions from being filtered by the new network apis.
I usually upgrade after the second or third minor patch, but im going to be holding out.
Compared to the PPC->Intel transition, this is a cakewalk. Compared to Microsoft's (multiple attempts) to migrate to ARM, this is a true triumph.
For the average, normal human, they won't notice which platform they're on. Only someone with a niche need will have any issues. and those issues are being fixed rapidly.
While there are definitely gotchas and considerations, i've seen people say there will never be audio software on m1 in the next 2 years. there's already daws with m1 support and bridging for vsts being released.
So, it's hard to buy into the idea this platform transition has been so horrible you'd abandon using macs.