I am starting a docker container from a subprocess.Popen and it works, but when the script returns, the terminal settings of my shell are messed up. Nothing is echoed. I can fix this with tset
in the terminal, but I don't want to require that. Has anyone here worked with docker and had seen and solved this issue?
Here is how I am starting the container:
cmd = ['sudo',
'docker',
'run',
'-t',
'-i',
'elucidbio/capdata:v2',
'bash'
]
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
I have tried replacing the bash with an infinite loop and using nohup
, but the same thing happened.