自动部署脚本:

systemctl restart docker
docker start acee
docker exec -ti acee /bin/bash <<EOF
sh abc.sh
exit
EOF

报错:the input device is not a TTY

命令中去掉t 错误解决

命令改为:

systemctl restart docker
docker start acee
docker exec -i acee /bin/bash <<EOF
sh abc.sh
exit
EOF

 

转载于:https://www.cnblogs.com/killall007/p/9494189.html

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐