wes862 Posted March 26, 2016 Share Posted March 26, 2016 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 Quote Link to comment
drdobsg Posted May 4, 2016 Share Posted May 4, 2016 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 Quote Link to comment
BRiT Posted May 4, 2016 Share Posted May 4, 2016 Docker exec works with the image name, no need for ids. Quote Link to comment
lovingHDTV Posted May 4, 2016 Share Posted May 4, 2016 I just do a : docker ps cut-n-paste the id into docker exec -it <paste> bash then if I want to run top export TERM=xterm I find it faster to cut-n-paste the ID than trying to remember/figure out the names david Quote Link to comment
BRiT Posted May 4, 2016 Share Posted May 4, 2016 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. Quote Link to comment
roland Posted May 4, 2016 Share Posted May 4, 2016 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 Quote Link to comment
drdobsg Posted May 6, 2016 Share Posted May 6, 2016 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 Quote Link to comment
Recommended Posts
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.