microsoft / cnetstat

A container-aware netstat
MIT License
8 stars 2 forks source link

After install cnetstat only returns error message #9

Open alan-czajkowski opened 2 years ago

alan-czajkowski commented 2 years ago

after installing cnetstat into my Docker image like so:

FROM ubuntu:22.04
...
RUN curl -L "https://github.com/microsoft/cnetstat/releases/latest/download/cnetstat.x86_64" > /usr/local/bin/cnetstat \
 && chmod +x /usr/local/bin/cnetstat
...

and running it like so:

$ docker run --rm -it example.com/debug:latest /bin/bash
root@57c6ee799ba3:/# cnetstat 
Error: exit status 1

volume mounting /var/run/docker.sock does not help:

$ docker run --rm -it --volume /var/run/docker.sock:/var/run/docker.sock example.com/debug:latest /bin/bash
root@57c6ee799ba3:/# cnetstat 
Error: exit status 1

tools such as lsns, nsenter, etc. exist in the image

alan-czajkowski commented 2 years ago

@noahl any help is greatly appreciated

noahl commented 3 months ago

@alan-czajkowski , sorry for the delay! Are you still having this problem?

If so, I can help debug it.

alan-czajkowski commented 3 months ago

@noahl can you try to replicate in a Dockerfile using Ubuntu 24.04 (instead of 22.04) and see what you get?