denisbrodbeck / machineid

Get the unique machine id of any host (without admin privileges)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[question] using machineid on docker container.

twiny opened this issue · comments

commented

hello,

I m using machineid on an Alpine docker image. is there anyway to extract the machine unique ID right from the container?

Thanks

Are you trying to get a unique ID of the container? Or the unique ID of the host running on the container?

I haven't tried, but if you want the unique ID of the host from the container, you could try to pass /var/lib/dbus/machine-id as a read only mount.

If you want a unique ID of the container, maybe try to install dbus?
https://pkgs.alpinelinux.org/package/edge/main/x86/dbus