#79 Get container name from within Toolbox
Closed a year ago by tpopela. Opened a year ago by chromakey.

With Docker you can get the name of your container from the ENV variables or by looking /etc/hostname

With toolbox it seems it strips off the unique container-id and names ... and everything is simply named "toolbox" regardless of which toolbox you are in.

For any kind of production/development work this is a serious issue... and for everyday desktop use it's a problem more on the annoying side than on the "dealbreaker" side but still.

Is there a way to get the container name from within the container that I'm missing?

Please help guys... and thanks for all the hard work ... this is such a cool concept ... personally I'm hoping this becomes the new "linux" across all distros.

Thanks! chromakey/noah

Hey @chromakey! Thank you for mentioning this. There are already a few tickets in our issue tracker on GitHub (https://github.com/containers/toolbox/issues/98, https://github.com/containers/toolbox/pull/383, https://github.com/containers/toolbox/pull/210) regarding this issue.

When a solution is chosen, it won't probably be added into the shell script but into the new version of Toolbox that is written in Go.

Metadata Update from @tpopela:
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.