Hey Everyone, I was introduced to Docker in a bootcamp and understand it, but am having a strange, but I think simple issue. I installed Docker on my MacBook Pro (2019) and can run docker commands in the Mac Terminal with no issue. I downloaded the Ubuntu:latest container and want to connect to run commands on there. I start the container and then run docker attach Ubuntu (the name for the container) and my command line changes to the Ubuntu container. The problem is I can’t successfully run any commands from the terminal window. For example, if I type ls, nothing happens, the cursor goes to the next line and just blinks. Any idea what I’m missing? I did figure out how to attach to the container using docker exec -it /bin/sh, but I’m curious why I can’t interact through the attach command. Any help is much appreciated!
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Unable to execute commands on docker container attach | 1 | 1212 | May 24, 2020 | |
| Docker does not attach to a container | 0 | 703 | August 16, 2020 | |
| Docker commands hang after exiting attached container | 0 | 2744 | July 13, 2016 | |
| Noob question.Attaching to docker containers "Docker exec" or "Docker attach" | 0 | 531 | September 25, 2019 | |
| Keyboard input not working after attaching to a running container | 1 | 6165 | September 17, 2022 |