【发布时间】:2021-01-11 14:15:38
【问题描述】:
我正在尝试将 SQL 数据导入 docker 容器。使用 git bash / mintty:
> docker exec -it 79c5c16acca0 mysql -uusername -ppassword dbname
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
> winpty docker exec -it 79c5c16acca0 mysql -uusername -ppassword dbname
stdin is not a tty
我也尝试过 Powershell:
> Get-Content powo.sql | docker exec -it 79c5c16acca0 mysql -uusername -ppassword dbname
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
FWIW,在容器中运行 bash 工作正常:
> docker exec -it 79c5c16acca0 bash
root@79c5c16acca0:/#
【问题讨论】: