Commit 1e8a519
committed
feat: show RootlessKit version in nerdctl version output
When running in rootless mode, nerdctl version now includes the
RootlessKit version as a server component, matching the format used
by docker version. The version is retrieved via the RootlessKit API
socket (rootlessutil.NewRootlessKitClient + Info(ctx)) rather than
shelling out to rootlesskit --version, which is more robust and
avoids PATH issues.
The version is only shown when rootless mode is active (i.e. when
rootlessutil.IsRootless() is true). If the API socket is unavailable
or the Info call fails, a warning is logged and the component is
shown without a version string.
Fixes #4936
Signed-off-by: Aaron Mark <64331623+amarkdotdev@users.noreply.github.com>1 parent 1eab5e6 commit 1e8a519
1 file changed
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
| |||
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
236 | 269 | | |
237 | 270 | | |
238 | 271 | | |
| |||
0 commit comments