Python 码头执行董事
我基本上是想让Flask迁移的shell在Flask应用程序上下文中执行一个heredoc 下面是我试图在bash脚本中运行的命令Python 码头执行董事,python,bash,shell,docker,heredoc,Python,Bash,Shell,Docker,Heredoc,我基本上是想让Flask迁移的shell在Flask应用程序上下文中执行一个heredoc 下面是我试图在bash脚本中运行的命令 $ docker exec -it mycontainer ./manage shell <<-EOF # shell commands to be executed EOF 我的问题是,有没有一种方法可以将herdoc中的一组命令传递给shell?从docker exec命令中删除-t选项以删除附加的伪TTY或使用--TTY=false: d
$ docker exec -it mycontainer ./manage shell <<-EOF
# shell commands to be executed
EOF
我的问题是,有没有一种方法可以将herdoc中的一组命令传递给shell?从docker exec命令中删除
-t
选项以删除附加的伪TTY
或使用--TTY=false
:
docker exec -i mycontainer ./manage shell <<-EOF
# shell commands to be executed
EOF
docker exec-i mycontainer./manage shell
docker exec -i mycontainer ./manage shell <<-EOF
# shell commands to be executed
EOF
docker exec -i --tty=false mycontainer ./manage shell <<-EOF
# shell commands to be executed
EOF