docker icon indicating copy to clipboard operation
docker copied to clipboard

sh: 1: ip: not found

Open myroad94 opened this issue 4 months ago • 3 comments

Using nextcloud:31.0.7-fpm, I have when I click in system info in browser, then in the nextcloud server logs:

sh: 1: ip: not found

Indeed, I do not have ip in the container image.

myroad94 avatar Jul 30 '25 19:07 myroad94

I guess because of this: https://github.com/nextcloud/serverinfo/blob/50ce6b83e96b696cb170448b7cffc3526b75fe0b/lib/OperatingSystems/Linux.php#L131-L134

And related to this: https://github.com/nextcloud/serverinfo/issues/169

But we could also add the iproute2 package maybe. Though not sure it's important enough to be there by default in every container deployment; particularly since an upstream (in the serverinfo app) alternative approach might be an option. 🤔

joshtrichards avatar Jul 31 '25 02:07 joshtrichards

Even if it's not for nextcloud, having ip utility by default is quite convenient. Each time I exec inside a container and it does not contain ip, ps, ss, I get a bit mad ^^ But I agree it is not of high importance.

myroad94 avatar Aug 01 '25 15:08 myroad94

My point of view: From my fairly extensive experience, I've never seen the package by default and there isn't a legitimate reason to look for container's gateway anyway. I'd say fix the app to cover all scenarios(Linux/docker) or just detect docker and don't throw error, having the iproute2 package in all containers all around the globe is kind of pointless. It's not that huge of a binary (3 megabytes) to actually matter, but keeping things clean is kind of the point of Docker.

tzerber avatar Oct 02 '25 19:10 tzerber