What is the purpose of the “-i” and “-t” options for the “docker exec” command?
问题 To be honest, I have always been confused about docker exec -it … , docker exec -i … and docker exec -t … , so I decide to do a test: docker exec -it … : # docker exec -it 115c89122e72 bash root@115c89122e72:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var It works normally. docker exec -i … : # docker exec -i 115c89122e72 bash ^C The command hangs and I have to use Ctl + c to interrupt it. docker exec -t … : # docker exec -t 115c89122e72 bash root