-1

I want to retrieve my computer's hostname using a container. I want to be able to recieve the same output when I write 'hostname' to my command line on my machine. How can I achieve this?

While I could get my public ip address using 'ifconfig.me' command, the 'ifconfig.me/host' command returns 'unavailable'.

Furkan
  • 11
  • no, answers there mostly solve it by using environment variables, which is not the method I'm trying to solve it with. @RickRackow – Furkan Aug 14 '23 at 08:28
  • If the linked question doesn't have satisfying answers, it's mostly because Docker's network isolation intentionally hides this detail from containers. Since an administrator can run hostname(8) to change this name to whatever they want, it's not necessarily a meaningful name in any case. – David Maze Aug 14 '23 at 10:42

0 Answers0