starting docker container messes up terminal settings
Larry Martell
larry.martell at gmail.com
Sun May 8 12:25:02 EDT 2016
On Mon, May 2, 2016 at 10:28 AM, Larry Martell <larry.martell at gmail.com> wrote:
> On Mon, May 2, 2016 at 10:08 AM, Joaquin Alzola
> <Joaquin.Alzola at lebara.com> wrote:
>>>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 and return doesn't cause a >newline. 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?
>>
>> It is good to put part of the code you think is causing the error (Popen subprocess)
>
> cmd = ['sudo',
> 'docker',
> 'run',
> '-t',
> '-i',
> 'elucidbio/capdata:v2',
> 'bash'
> ]
> p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
> stderr=subprocess.STDOUT)
If anyone cares (which is doubtful), I fixed this by removing -t and
passing in stdin=None to Popen.
More information about the Python-list
mailing list