Hacker News new | ask | show | jobs
by woadwarrior01 44 days ago
Try Apple's container CLI. I moved a project of mine from colima+docker to it relatively easily, a couple of weekends ago.

https://github.com/apple/container

6 comments

Does this project aim for docker cli and api compatibility? Searching for Docker on that page yields no results. Though in their example, they do show an example of a Dockerfile referencing docker.io without shame.

Typical Apple behavior, I guess, but grating to see in a OSS tool.

This is a weird take, imho. Should they feel shame for using Dockerfiles in their OCI-standard-compliant tool? Would you be happier if they introduced subtly incompatible Applefiles?

Why are they obliged to emulate the Docker CLI? This limits them to just shadowing someone else's product. Just use Docker if you want their CLI/API, it uses the same virtualization framework under the hood on Macs.

Isn’t Containerfile a bit more neutral ground?
Here's an example of how to build a simple Alpine Linux container using Apple's containerization CLI. It also demonstrates how to connect to the container through Tailscale SSH using a Tailscale auth key stored in Apple Keychain:

https://github.com/highpost/tailscale-macos-container

Why would this be preferred over the Tailscale macOS app? What are the advantages of this method?

Thanks.

The macOS app manages the host Tailscale service, while this example demonstrates how to connect with a *macOS container* using Tailscale SSH based on the Tailscale service under userspace networking mode. This gives the container its own dedicated Tailnet IP and identity without needing to port-forward through the host.

edit: For example, I can create a container on my MacBook to run an application. A colleague *in my Tailnet* can then connect to this container to interact with that application from a coffeeshop or airliner while not exposing the rest of my MacBook.

Thanks for the answer. I understand now.
I'm curious to know what kind of project is macOS exclusive?
You're surprised that a project by Apple Inc that is basically a wrapper around the Mac virtualisation framework [0] is Mac exclusive?

[0] https://developer.apple.com/documentation/virtualization

container is really good, ive been using it to sandbox some CLI tools and it starts up in less than a second
Thank you for this, will check it out!
AFAIK no support for Compose though