-
Notifications
You must be signed in to change notification settings - Fork 603
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
How to install containerd with alpine-lima #489
Comments
There is some minimal support for adding |
Forgot to add: the |
Okay, so the same tarballs as above would work (or the full download) - just have to be done in the image builder. I couldn't find any existing APKBUILD, but then again there doesn't seem to be any .deb or .rpm available either... My main question was if it needed extending. containerd:
# Enable system-wide (aka rootful) containerd and its dependencies (BuildKit, Stargz Snapshotter)
# Default: false
system: false
# Enable user-scoped (aka rootless) containerd and its dependencies (currently requires systemd)
# Default: true
user: false
# # Override containerd archive
# # Default: hard-coded URL with hard-coded digest (see the output of `limactl info | jq .defaultTemplate.containerd.archives`)
# archives:
# - location: "~/Downloads/nerdctl-full-X.Y.Z-linux-amd64.tar.gz"
# arch: "x86_64"
# digest: "sha256:..."
extras:
- name: "nerdctl"
location: "https://github.com/containerd/nerdctl/releases/download/v0.15.0/nerdctl-0.15.0-linux-amd64.tar.gz"
arch: "x86_64"
digest: "sha256:1371da3f6bd461f331946654f6dd3ef2ef4b9da0dd7bc5f78ed1166f32ad5adc"
directory: "/usr/local/bin"
- name: "nerdctl"
location: "https://github.com/containerd/nerdctl/releases/download/v0.15.0/nerdctl-0.15.0-linux-arm64.tar.gz"
arch: "aarch64"
digest: "sha256:7b79e2e8fd88b71ed4e0563c7e7dd27008b7ac7990ad2206efb012def850d150"
directory: "/usr/local/bin"
- name: "buildkit"
location: "https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-amd64.tar.gz"
arch: "x86_64"
digest: "sha256:f60461abdf2aee8444a4cb0607e4766da3bd503859320819ea8c43fe4a02576c"
directory: "/usr/local"
- name: "buildkit"
location: "https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-arm64.tar.gz"
arch: "aarch64"
digest: "sha256:3ee57ac33f8ff6ab1d187e25a217f8f2358826b14d707fd8fe0df6f536613aaf"
directory: "/usr/local" But that doesn't add the buildkit init script, either. |
I guess it needs some kind of "nerdctl" edition then, and then use that in the example instead of the "std" edition ? |
Added issue: If that is done, there is no need to make packages.
It would still be "nice to have", but separate issue... |
It is not clear to me why this shouldn't just go into the |
I thought you wanted to avoid having containerd in std, so that it can be installed by lima (at runtime) or k3s ? My original idea was just setting it to true, but it failed on systemd containerd:
system: true
user: false |
I don't want it to run automatically, but I think having it pre-installed, together with the required initd scripts would be fine. I'll reserve final judgement when I know how much it adds to the size of the ISO. 😄 A long time ago I was contemplating to extend the rootless setup script to be able to create openrc scripts in addition to systemd units. But I didn't really needed it, so it is kind of low on my todo pile... |
It seems the ISO is around 100 MB, so that makes it 1500 MB smaller than the "default"
But from what I can tell, the previous build was 50 MB so maybe worth leaving out then ? Also not having to include nerdctl-full does make the cidata.iso a lot smaller, if that counts. |
Maybe, but what is the use case for the
Maybe; I'll have to think about this some more. IIRC @AkihiroSuda was somewhat opposed to bundling |
Well, it does work - as long as you don't want to run containers on it ? Then it needs more software. But it doesn't have to go in the ISO, it could be added from tgz or from apk - as originally sketched... |
It would be perfectly fine if rootless continued to fail, it was just for installing the daemons for use with sudo. And installing from nerdctl/buildkit instead of nerdctl-full would be a nice feature, but it is not required either.
I would prefer if buildkit was also installed from apk, it seems to already be required* for containerd to use apk. * Since alpine uses a different C library, only static binaries will work. The dynamic ones have glibc dependencies. |
The
This is actually not correct; the apk version of |
There could be other reasons too, like the static tarball also bundles
bin/buildkitd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=X2aFQsdVAvRxWnSawzAH/1Hw0V0nkfjHgYf9usyh3/fFM6G3pQuF8I1Z801d1I/7c0ogZwxeBYT3Q_A6vyA, not stripped Or just building from source (for the sake of it). |
Not sure what you are trying to say; |
I mean there could be other reasons from installing buildkit from an apk, sorry for being vague. |
This is kind of off-topic here, but the nerdctl-full distribution could be shrunk down a lot by stripping binaries and converting them to multi-call binaries, like busybox. Compare the
with the versions from (an older) nerdctl-full tarball (which was missing flannel):
There are a lot more cni plugins in the tarball, so the savings would add up, but I'm not sure if it is worth the effort. |
This comment has been minimized.
This comment has been minimized.
And the nerdctl-full download is fine (I wish that Podman had it, makes adoption much easier), just that it is also nice to be able to use |
They are available as packages now, and a year has passed. The "alpine" image will still be bare bones. |
It's not fully clear how to add containerd to alpine, since the scripts require systemd:
Installing containerd is quite simple, but packages for "nerdctl" and "buildkit" are missing...
They can be added from the tarballs, but there doesn't seem to be any support available ?
That is, the current support is for nerdctl-full only (and not for nerdctl and buildkit archives)
Would it be better to make custom aports, or perhaps to add support for extra archives ?
containerd
nerdctl
buildkit
Both
lima sudo nerdctl run
andlima sudo nerdctl build
seem to be doing just fine...The text was updated successfully, but these errors were encountered: