0

I'm currently trying to get a list of all installed debian packages (dpkg) on the k8s.gcr.io/kube-proxy:v1.23.2 container.

First I tried to execute dpkg -l in the running container as a part of my kubernetes cluster but got the following error.

dpkg-query: error: showing package list on pager subprocess returned error exit status 127

Then I also tried the command directly on containerd nerdctl run -it k8s.gcr.io/kube-proxy:v1.23.2 dpkg -l but got the same error.

Is it possible to get the list by modifying some settings, or is there any different approach?

Daigo
  • 278
  • 1
  • 17

1 Answers1

2

I suspect that dpkg attempts to run a pager (less) but it is not found in PATH so your get 127 exist code. Run dpkg -l --no-pager.

AlexD
  • 8,179
  • 2
  • 28
  • 38