如何使用 nohup 在后台获取 docker 命令到 运行

How to get docker commands to run in the background with nohup

我运行宁docker命令因此:

docker exec -t -i 44a1459f4468 cloudgene run imputationserver@1.4.1 --files /chrX_impute/ALL.chrX.Non.Pseudo.Auto.phase3_v5.shapeit2_mvncall_integrated.noSingleton.genotypes.vcf.gz --refpanel apps@1000g-phase-3-v5@2.0.0 --conf /etc/hadoop/conf --population mixed --mode qconly --output /chrX_impute/ALL.chrX.Non >  ALL.chrX.Non.qc.log 2>&1

使用我从 Redirecting output of nohup in docker not working 和重定向

获得的建议

但是,当我运行这个命令时,它不会运行在后台。

https://unix.stackexchange.com/questions/268284/nohup-doesnt-work-as-expected-in-docker-script 听起来好像添加 -t 会使它 运行 就好像它是 shell 命令一样,但这只适用于 docker run.

如何使用 nohup 将此 docker 命令发送到 运行?

来自 docker exec 文档页面 https://docs.docker.com/engine/reference/commandline/exec/

--interactive , -i      Keep STDIN open even if not attached
--tty , -t              Allocate a pseudo-TTY

我想删除 -i-t 标志可能就足够了