Skip to content

How to install containerd with alpine-lima #489

Closed as not planned
Closed as not planned
@afbjorklund

Description

@afbjorklund

It's not fully clear how to add containerd to alpine, since the scripts require systemd:

ERRO[0018] [1 error occurred:
	* failed to satisfy the optional requirement 1 of 2 "systemd must be available": systemd is required to run containerd, but does not seem to be available.
Make sure that you use an image that supports systemd. If you do not want to run
containerd, please make sure that both 'container.system' and 'containerd.user'
are set to 'false' in the config file.

Installing containerd is quite simple, but packages for "nerdctl" and "buildkit" are missing...

provision:
  - mode: system
    script: |
      #!/bin/bash
      set -eux -o pipefail
      command -v containerd >/dev/null 2>&1 && exit 0
      apk add runc containerd cni-plugins
      sudo rc-update add containerd default
      sudo service containerd start

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

  • nerdctl-0.15.0-linux-amd64.tar.gz
  • nerdctl-0.15.0-linux-arm64.tar.gz

buildkit

  • buildkit-v0.9.3.linux-amd64.tar.gz
  • buildkit-v0.9.3.linux-arm64.tar.gz
  • buildkit.confd
  • buildkit.initd

Both lima sudo nerdctl run and lima sudo nerdctl build seem to be doing just fine...

init-+-acpid
     |-7*[getty]
     |-sshd.pam---sshd.pam---sshd.pam-+-pstree
     |                                `-2*[sshfs---3*[{sshfs}]]
     |-supervise-daemo---lima-guestagent---7*[{lima-guestagent}]
     |-supervise-daemo---containerd---10*[{containerd}]
     |-supervise-daemo---buildkitd---8*[{buildkitd}]
     |-syslogd
     |-udevd
     `-udhcpc

Metadata

Metadata

Assignees

No one assigned

    Labels

    guest/alpineGuest: AlpinequestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions