Terminal hangs when using docker exec with Microsoft Azure Container Instances (ACI) integration
Description
I followed the documentation to connect the Docker CLI to Microsoft Azure Container Instances (ACI). Once I spun up a sample NGINX container, I wanted to exec into the ACI container group. Once I did this, according to the documentation, my terminal completely hung.
Steps to reproduce the issue:
-
docker login azure -
docker context create aci myacicontext -
docker --context myacicontext run -p 80:80 nginx -
CTRL + C -
docker exec --tty <CONTAINER_ID> bash
Describe the results you received:
- Terminal completely hung.
-
CTRL+Cdoesn't work. -
CTRL+P, CTRL+Qdoesn't work. - Typing any standard keyboard characters doesn't work.
Describe the results you expected:
My Bash terminal in the ACI container group should be interactive and usable to explore inside the container.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.16.4
Git commit: f0df350
Built: Wed Jun 2 12:00:56 2021
OS/Arch: windows/amd64
Context: trevoraci
Experimental: true
Output of docker info:
Not available in Docker ACI integration mode.
Command "info" not available in current context (trevoraci), you can use the "default" context to run this command
Additional environment details (AWS, VirtualBox, physical, etc.):
- Windows 10 Developer Preview Build 21387
- Windows Terminal 1.8.1521.0
- PowerShell Core 7.1.3
I think this is a doc bug. Adding --interactive works fine when using exec, but not when using run.
C:\> docker run -it nginx
unknown shorthand flag: 'i' in -it
C:\> docker exec -it peaceful-mendel bash
root@SandboxHost-637606665499607545:/# asdfasdfasdfasdfasd
I also noticed that exiting out of an interactive process in a container results in a weird error message.
C:\> docker exec -it peaceful-mendel bash
root@SandboxHost-637606665499607545:/# asdffdsdsf
bash: asdffdsdsf: command not found
root@SandboxHost-637606665499607545:/# exit
exit
command terminated with non-zero exit code: error executing command [bash], exit code 127failed to read input from container: ws closed: 1000
It seems like the Docker CLI should close out of the interactive process more gracefully than it does.
Thanks for reporting; this looks like an issue with the "cloud" integration, which is maintained in the https://github.com/compose/compose-cli repository; let me transfer this ticket to that issue tracker
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bump
This issue has been automatically marked as not stale anymore due to the recent activity.
I had a similar issue today using Apple M1 Max MacBook Pro after using docker exec in a workshop. The process hanged and started causing issues for all Unix commands within the terminal. I had to quit Docker Desktop to get back to a normal state.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it had not recent activity during the stale period.