Skip to content

Darwin build #3763

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

Merged
merged 1 commit into from
Apr 21, 2025
Merged

Darwin build #3763

merged 1 commit into from
Apr 21, 2025

Conversation

slonopotamus
Copy link
Contributor

@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
Contributor Author

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

@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
Contributor 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
Contributor 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.

@fahedouch fahedouch mentioned this pull request Apr 6, 2025
@AkihiroSuda
Copy link
Member

Needs rebase

@slonopotamus slonopotamus force-pushed the darwin branch 2 times, most recently from be1b8d6 to eb314f9 Compare April 21, 2025 07:29
Closes containerd#732

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
@slonopotamus slonopotamus marked this pull request as ready for review April 21, 2025 07:35
@AkihiroSuda AkihiroSuda added this to the v2.0.5 milestone Apr 21, 2025
@@ -27,6 +27,8 @@ jobs:
goos: linux
- os: ubuntu-24.04
goos: freebsd
- os: ubuntu-24.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ubuntu?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just selects a runner. I always was under impression than Linux runner are faster and more available on GitHub Actions. Also, Ubuntu runner is used for Windows lint in this file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use ubuntu for windows because something is botched wrt Makefile path when on windows...

Will move it to macos-15 - the point is not so much speed here, but verifying that the tooling itself actually works on the target platform.

Making things a bit more clear here: 9c83660

But yeah, it's a detail..

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit a33d0b2 into containerd:main Apr 21, 2025
32 checks passed
@slonopotamus slonopotamus deleted the darwin branch April 22, 2025 05:12
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.

4 participants