Skip to content
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

Darwin build #3763

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Darwin build #3763

wants to merge 1 commit into from

Conversation

slonopotamus
Copy link

@slonopotamus slonopotamus commented Dec 15, 2024

Closes #732

@apostasie
Copy link
Contributor

Interesting!

Thanks @slonopotamus

Is it functional right now? eg: if I share the right folders from a linux VM on a mac, is it "working" enough?

@apostasie
Copy link
Contributor

@slonopotamus would love to see at least some of that to get in.
Would you still have time and motivation for this?

@slonopotamus
Copy link
Author

Whoops, forgot about this. Will see what can be done...

Closes containerd#732

Signed-off-by: Marat Radchenko <[email protected]>
@SamuelMarks
Copy link

Testing now. Seems to build fine. Had to install buildkit and do some configuration so that containerd would run at a path it has access to.

Currently at this issue:

% sudo _output/nerdctl --address '/opt/containerd/run/containerd.sock' version
Password:
WARN[0000] unable to determine runc version              error="exec: \"runc\": executable file not found in $PATH"
Client:
 Version:	v2.0.3-213-g3c2889e7
 OS/Arch:	darwin/arm64
 Git commit:	3c2889e71ec12431a7d93c2a954674bd12658dc3
 buildctl:
  Version:	0.20.1
  GitCommit:	de56a3c5056341667b5bad71f414ece70b50724f

Server:
 containerd:
  Version:	v1.3.2-vmw
  GitCommit:	
 runc:
  Version:

Looks like runc doesn't support macOS: opencontainers/runc#1733

Will work on that repo I guess and try to port it?

@slonopotamus
Copy link
Author

runc can't and won't run on macOS, it is fully tied to Linux.

@SamuelMarks
Copy link

Yeah I realised that pretty quickly…

So how is this meant to work then?

@slonopotamus
Copy link
Author

Well, there is a nonzero amount of other runtime shims that could run natively on macOS (though they might not as of today):

Note that things these shims run are not a conventional "containers" with Linux userspace in them, but something different. However, nerdctl should not care about this. Its job is to call proper APIs of containerd and pass it parameters that tell containerd to do what user requests.

And by the way, nerdctl already has some kind of FreeBSD support. FreeBSD also cannot run runc (for the same reasons as macOS cannot), however there exists runj shim that can run FreeBSD jails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants