Jump to content

[SOLVED] Possible to get a console for a docker container?


Recommended Posts

TL;DR Is it possible to get a shell to a container so I have access to binaries in the container?

 

I use SABnzbd to download stuff. And, as good as it is, I sometimes have to manually muck with the archives [unrar, par2, ...]. Previously with plugins, those utilities were installed natively on unRAID, so, I'd have access to them from any old shell. Now that SABnzbd is in a container, I can no longer run those tools from a shell.

 

Link to comment
  • 7 years later...

Hilariously, your post is now the top Google search result for 

shell inside docker container unraid

and the link you provided is dead.

Since I can't easily find another good reference, I'll just post the solution here (for Unraid 6.11.5):

1. Open a terminal on your Unraid Host (you can use the web terminal feature if you like)

2. Run 

docker ps

and note the ID of the container you wish to run.

3. Run

docker exec -it previously_noted_ID /bin/bash

(replace /bin/bash with a shell present in your container as necessary)

Link to comment
  • 1 month later...

Just to clarify ... I wasn't "doing it wrong". :)

 

I understand that the directories are mapped. That wasn't the issue. What I needed access to were the _tools_ [ie. par2, etc...]. Those aren't natively available on unraid, but are installed within the container.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...