metov / installcmd

Print correct command for installing a package.
1 stars 1 forks source link

Distro name not detected correctly on Docker #5

Closed metov closed 3 years ago

metov commented 3 years ago

We are relying on the platform node to get the distro: https://github.com/metov/installcmd/blob/63bfd441f3ad3c15cfb7187e45dad3a77f653879/installcmd/lib.py#L88-L90

However in Docker containers, this comes out as a hash rather than the actual distro:

$ docker run python python -c 'import platform; s = platform.uname().node; print(s)'
95fb42258f4f

The release is also incorrect (it shows the host's datum).