你使用了多个
"
在你的指挥下
escape characters
或
'
.你的命令应该是这样的:
docker run -d -it -i -t --name test ubuntu sh -c "echo 'Input website:'; read website; echo 'Searching..'; sleep 1; curl 'http:\\$website;'"
或者:
docker run -d -it -i -t --name test ubuntu sh -c "echo \"Input website:\"; read website; echo \"Searching..\"; sleep 1; curl 'http:\\$website;'"
或者如果它不起作用,你可以改变
http://
到
http:\/\/
如果它仍然不起作用,这可能会对你有所帮助。