Podman, the open source Docker alternative ported to M1 (Apple Silicon) machines
github.com
github.com
Q: Does this run amd64 docker images or aarch64 docker images?
A: aarch64 images currently, but I'm going to patch podman to make it possible to run both amd64 image and aarch64 image. All I have to do for this is to make QEMU call and Linux image configurable, so it won't be very hard. However, if you are running amd64 images, you will have to bear the performance overhead due to CPU emulation.
Q: Is this toy or are you actually going to maintain this?
A: I'm DevOps engineer and I made podman-apple-silicon to actually use this in my day job.
Q: Are you going to merge this to the upstream?
A: I'll keep trying, but it won't be easy unless QEMU merges Alex Graf's Hypervisor.framework patch.
I may forgot to check HackerNews, so please feel free to ask me anything about podman-apple-silicon at https://twitter.com/simnalamburt
From what I understand, if you had working QEMU-static and binfmt, wouldn't cross-architecture containers just work? I've used that a lot in chroots, and I'm confused as to why that wouldn't just transparently work in this case.
Are you talking about just making that process easier? Does podman enforce extra checks that prevent you from using binfmt?
1. The arguments given to the qemu should be changed by the CPU arch. For example, AArch64 uses ‘-accel=hvf’ while amd64 in Apple Silicon must use ‘-accel=tcg’. AArch64 requires ‘-cpu’ option whild amd64 does not. etc. And currently, the arguments of QEMU is half-way hardcoded to the podman source code.
2. You should change the linux image when you change the CPU arch. Currently, podman always downloads the Linux image whose CPU arch is same with host’s CPU arch. This is where configuration should be added.
3. aarch64 uses UEFI while amd64 don’t need to (I don’t know why)
Sounds like amd64 is falling back to BIOS, while aarch64 never really had any other standard than UEFI. You should be able to run UEFI for amd64 too if you force the machine type to pc-q35-6.1 (or whatever QEMU version you're using).
Hopefully Podman will be able to capitalize on this event and get the polish needed for widespread use.
The first thing I tried to figure out when looking into Docker for work was how to limit the registries it would look at to only be our own when used in production, and I was surprised to find out you can't (at least not without a hack to make it think it's using a mirror and just hitting your registry first).
You can't. And modifying the source was so convoluted that we gave up.
Then we needed to clean up docker (before there were commands to do that) when it started to eat up all of the disk space.
To our (un)surprise, Docker uses 3 (!!) different storage formats, many of them having redundant information, and editing one of them would cause the other to be corrupted.
One was a binary database format that was specific to Go and didn't have any utility CLI to work with, so you had to write a programmatic interface with it just to edit it.
Or how about the fact that even if you issue commands directly to docker over the HTTP Unix socket, it will deadlock if you issue too many commands to it? This became our nightmare when trying to implement one of the first iterations of custom deployment backends at ZEIT. In fact, the entire project failed because of docker (there was no great alternative at the time).
Maybe where I'm getting at is, I can think of 99 problems but docker gzip ain't one :) how was this a priority (at some point)
And yes, as the other person mentioned, it was on the wire GZIP, not storage concerns.
There's a comment in the second link that's references in the first one that explains the rationale for the pull request refusal:
Like pointed out earlier (#11815), this would fragment the namespace, and hurt the community pretty badly, making dockerfiles no longer portable.
You can see that full comment at https://github.com/moby/moby/issues/11816#issuecomment-86732..., and it also references that this will be possible with signed images, so I don't know what happened after that (but that was over 6 years ago).
Disabling all registries except for those whitelisted and requiring full names for those would probably have been sufficient for this problem, and not fractured the community IMO. There's a difference between what you allow in dev and what you allow in production, where you should have a chance to vet all new requirements and ensure they are appropriate. It's just unacceptable for some organizations to allow stuff to be as ad hoc as that, as much as Docker might want to inject itself into their processes at that level.
Yes this is what I was getting at. You don't need to override the meaning of image names, you just need to be able to disable registries outside your control and prefix all your images. It's like an additive vs subtractive blindness effect that caused people to miss this solution.
Part of me thinks that's a shame, because it seems like it's just that a for-profit entity behind the project was the only reason for doing so, but at the same time, the outcome isn't bad I think. Having multiple high-quality choices with different driving causes (and organizations) behind them is more beneficial in the long run than just one. Competition is good, even in open source, most the time.
Anyone is one typo away from installing random junk from the internet on your machines. No one should be using docker in production while it can connect to a public registry where you have zero control of its contents.
> I agree that it should be possible to disable the default registry, but I'm not sure I agree with allowing you to override it. (These requests appear to be conflated in various comments.) Use your own registry by specifying the domain first `myregistry.example.com/repo/image`; an unadorned `repo/image` being globally reserved as shorthand for `registry.docker.io/repo/image` seems fine. Allowing overriding the meaning of `repo/image` would be a support nightmare for both moby and internal IT, just use qualified names.
Literally anyone in your company can forget to say `myregistry.example.com/` at any moment. And then your whole infrastructure runs on some random image that you didn't vet. You're a typo away from having your machines owned, your entire infrastructure falling over, your data being exposed to the anyone.
This is no way to live and it's no way to run a company.
https://thenewstack.io/linux-cgroups-v2-brings-rootless-cont...
https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2...
Could you elaborate on this part? Are you running in Kubernetes or somehow using the pod definition format with Podman? I'd like a way to declaratively specify my Podman pods without docker-compose and friends.
It is also able to generate pod definitions from created containers, as well as generate systemd units that you can then enable allowing systemd to manage your pods/containers.
Thanks, some reading for me to do, will be testing both those features out imminently!
As an alternative, as of podman v3 (rootfull) and v3.2 (rootless) podman has an optional podman socket you can enable. The API is docker compatible, thus allows for full docker-compose support, and will take any other application that interacts with the docker api directly.
Also I don't trust Red Hat / IBM with the CentOS fiasco.
Also, I believe podman works in WSL with some tweaks.
You can do the same thing for podman: run podman on Linux on Windows.
Probably the link on this very article is a good starting point for doing that.
Given how often I still stumble over massively obsolete documentation and "helpful" articles from 15 to 20 years ago, I'd say they are safe.
With this I believe you could also used [nerd](https://github.com/containerd/nerdctl) instead of podman but I haven't tested it yet.
Edit: It works. Had a bit of trouble since I wanted to uninstall the "real" QEMU first, but `lima` still depended on it, and then installing the patched QEMU needed to update the version of `lima` I had installed, which then tried to reinstall QEMU, which failed because of some symlinks which were now owned by the patched QEMU...
This is the first time I hear of nerdctl and it's _very_ interesting.
M1 aside, does it work fine on regular arm64 linux? I run a small Raspberry Pi 4B homeserver and I would have used podman for improved security, were it not for the poor/incomplete Compose support, while nerdctl seems to explicitly support it.
Overall I don't have an opinion on the software, it's just confusing to me how much praise it receives?
Sorry it's not too helpful, but might be some clues for you.
What does "resetting your user" mean?
This isn’t an official port to the M1 — it’s a custom version patched by a different dev.
[0]: https://twitter.com/simnalamburt/status/1434244533001224192
BTW, in case you don't want to depend on a fork, upstream podman is going to gain M1 support (in the sense of 'podman-machine' knowing how to start aarch64 VMs with hvf) very soon.
I was under the impression that docker was open source.
I am mistaken?
[0] https://twitter.com/simnalamburt/status/1434244533001224192
At least binaries are not provided. https://docs.docker.com/engine/install/binaries/
I guess I'll have to switch to Podman too, even though I don't use Mac, just because we need a unified approach across OSes in our company and can't afford to have Mac-using developers be second-class citizens.
[1]: https://github.com/coreos/fedora-coreos-tracker/issues/13
Turns out the title is missing a vital piece of information that this is a port that targets macOS.
Jailbreaking on iOS is mostly about that sandbox. It doesn’t relate to BSD jails.
On macOS, Apple made the sandbox more lenient and implemented it a bit differently than on iOS. But both have roughly the same goals. They’re also alike in that both use the same kernel-level framework (MACF) to do their job.
But the MACF is completely off-limits to everyone outside Apple. Not even accredited kext developers can use it. So I think that no one except Apple could possibly add container-style isolation to macOS.
Thinking about the names Apple might call this tech is amusing, with their use of ‘me’ ‘I’ ‘Apple’ etc. I assume ‘Jail’ wouldn’t be in the name.
Darwin's userland is taken from FreeBSD, the kernel is from NeXTSTEP, although it also borrowed some things from FreeBSD, but I don't think they incorporated jails[1].
[1] https://developer.apple.com/library/archive/documentation/Da...
NeXTSTEP had proprietary UNIX code in it, and required a UNIX license from AT&T to distribute. Additionally, the display manager (infamously) was based on Display Postscript, which also required a license from Adobe.
My understanding (which is by no means 100% certain! the following is my best guess) is XNU and Darwin were almost complete "rewrites" of NeXTSTEP, preserving the "idea" but with new code.
NeXT's Mach 2 based kernel and BSD userland, which seems to have been very similar to the system developed by Avie Tevanian at CMU and used on their VAXen, was replaced with XNU, which used a Mach 3 derivative from DEC's OSF/1 project, coupled with a new (non-AT&T encumbered!) BSD userland and kernel "module"/personality based on an amalgam of then forks of 4.4BSD-Lite/386BSD, namely FreeBSD and NetBSD (several big bits of libc are from NetBSD).
Point being, I doubt they've copied/pasted large chunks of Free/NetBSD into Darwin/XNU since the late 90s/early 2000s. There was been code flow between the two, but I doubt they'd backport big features like jails (and linux emulation).
(not to mention that Apple's own MACF framework seems to take the place of jails in the code -- see https://github.com/apple/darwin-xnu/blob/main/bsd/kern/kern_... vs https://github.com/freebsd/freebsd-src/blob/main/sys/kern/ke...)
Although at that point having x86_64-linux, x86_64-windows and armv8-darwin would further remove benefits of docker reducing it to a fancy tarball.
(https://developer.apple.com/documentation/virtualization/vzm... is the best citation I have, unfortuately)
[0] https://twitter.com/simnalamburt/status/1434244533001224192
I honestly looked just now and couldn't find anything.
That is part of the "Docker Desktop" offer, which is non-free.
* Virtualbox * Your favorite Linux distro * Docker engine on the Linux VM * Docker CLI on the Mac host * A variety of filesystem sync solutions (I don’t remember their names but there are several)
Alternatively there’s also docker-machine.
The closed source app gets you the convenience of not having to set that all up. If you don’t like installing closed source apps you probably prefer to set things up yourself anyway. So what’s the problem?
Good practices start at home.
If you can make your dev setup model the production setup, that's one less thing to worry about.
Maybe excessive, maybe a good prophylactic for potentially damaging NPM packages (for example) to not get root on my CI infrastructure.
It's really bad UX.
Here's a bunch of complete web app examples of it working: https://github.com/nickjj?tab=repositories&q=docker-*-exampl...
Podman people, you’re better than this.
Second, Docker Desktop for MacOS and Windows are not open source, hence this repository is empty: https://github.com/docker/for-win
I understand its a good moment do advertise, but good tools happen to advertise themselves.
Nothing advertises itself. People advertise things, by posting about them.
I got the Air and I have managed to make it throttle while running x86 games. However, it wasn’t by much. The games remained playable.
Overall, it’s great. Very fast and entirely silent.
I also prefer the design of the Air, so it was an easy choice for me.
It’s not relevant for the M1 Air since it has no fans, of course.
It’s really not needed on the M1. The only time my Air got warm was in a game.