Jump to content

docker exec -it "name" /bin/bash shows unraid hostname


jtroberts

Recommended Posts

I'm trying to login to @sparklyballs mythtv container.  I need to upgrade the version of mythtv to .29.  I have done the docker exec -it command several time on other containers and it works fine.  I ALWAYS do a hostname command just to make sure I'm working in the container and not on the unraid OS.  So I have 2 issues.....

 

1. I cannot use container name.  for example.  "docker exec -it sparkly-mythtv /bin/bash"  Instead I always use the  container ID.  "docker exec -it f0bcfb2831c1 /bin/bash"

Any idea why can't I use the container name like every example on the internet shows?

 

2. When I run "docker exec -it f0bcfb2831c1 /bin/bash"  I get no error.  The root@Plex-TRW:~# changes from green to white.  (FYI my unraid hostname is Plex-TRW)

  - I immediately run "hostname"  and that returns "Plex-TRW"

So I'm hesitant to run any command for fear that they will be run locally on not in the mythtv container.

 

Any ideas?

 

 

Now I have seen before where bash does not work (I assume it's not installed in the container) and instead I would use /bin/sh  But this gives the same result when I run hostname

 

I have also ran docker exec -it f0bcfb2831c1 ifconfig  This unfortunately shows my the local host (plex-TRW) ifconfig and not of the container.

 

Please help.  thanks

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...