Docker attach cli


wes862

Recommended Posts

Trying to attach to docker images I pulled in from docker hub to figure out what the issues are...

I am new to docker however i cant figure out how to attach to the docker container to interface with the container.

Docker Newb Here

 

I usually run multiple vm's with with the apps installed native in the os and mod them to work for my app,

 

from what i have read i used docker attach [my container]

 

I get nothing from this command....

If I spell the container wrong I get told...

 

root@UNRAID:/run/lock# docker attach websync

Error: No such container: websync

root@UNRAID:/run/lock# docker attach WebSync

 

 

 

.... no response....

 

 

Thanks

 

Wes

Link to comment
  • 1 month later...

I am still learning this, but try "docker ps" which will list all containers.  The id of the container appears to be different than the image name.

 

When you attach to the docker you may just attach to a running process and not actually have shell access.  I assume what you really want to do is get shell access to the docker ....

 

docker exec -it DOCKERID bash

Link to comment

The names should exactly match the application name you provided in the UI so its very easy to remember values like "NZBGets" or "Transmission" or "EggDrop" or "PyTivo".

 

Its by far easier than anything else.

 

Good to know.  I think was trying template name instead of the actual docker name.

 

I wrote a little script to help me with that. You are welcome to use it.

 

I haven't used it recently, let me know if there is a problem.

 

https://github.com/Data-Monkey/unRAID/blob/master/tools/DockerSelector.sh

 

That looks handy, I may borrow that :)

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.