Skip to content

feat(version): print RootlessKit version in nerdctl version#4966

Closed
jfjrh2014 wants to merge 1 commit into
containerd:mainfrom
jfjrh2014:feat/version-rootlesskit
Closed

feat(version): print RootlessKit version in nerdctl version#4966
jfjrh2014 wants to merge 1 commit into
containerd:mainfrom
jfjrh2014:feat/version-rootlesskit

Conversation

@jfjrh2014

Copy link
Copy Markdown

What

nerdctl version now prints the RootlessKit version in the same format that docker version uses for its auxiliary components (buildctl, runc).

Why

Closes #4936.

Users running rootless containers have no quick way to see which RootlessKit version they're on from nerdctl itself. They currently have to shell out to `rootlesskit --version` separately. Docker shows runtime tooling versions in its version output; nerdctl already follows this pattern for `buildctl` and `runc` but was missing RootlessKit.

How

Adds `rootlesskitVersion()` alongside the existing `buildctlVersion()` and `runcVersion()` in `pkg/infoutil`. It shells out to `rootlesskit --version`, parses the output with `parseRootlesskitVersion()`, and returns a `dockercompat.ComponentVersion`.

When RootlessKit is not installed, the output gracefully degrades to a bare `rootlesskit` entry with no version — identical to how `buildctlVersion()` behaves when buildctl is missing.

Sample output:
```
Client:
Version: 1.0.0
OS/Arch: linux/amd64
Git commit: ...
buildctl:
Version: v0.20.2
GitCommit: ...
rootlesskit:
Version: 2.0.2
GitCommit: ...
```

Add rootlesskitVersion() to ClientVersion components, shelling out to
`rootlesskit --version` the same way runcVersion() and buildctlVersion()
already do. When rootlesskit is not installed the output gracefully
degrades to a bare "rootlesskit" entry with no version, matching the
behavior of the other optional components.

Closes containerd#4936
@AkihiroSuda AkihiroSuda added the duplicate This issue or pull request already exists label Jun 15, 2026
@AkihiroSuda

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nerdctl version should print the version of RootlessKit (in the same format as docker version)

2 participants