Hello,
I’m trying to launch a mitmproxy container with docker-compose but it always fails even with the tty: true parameter.
My docker-compose.yml is like :
version: '3'
services:
mitmproxy:
image: "mitmproxy/mitmproxy"
container_name: "mitmproxy"
ports:
- 8080:8080
tty: true
But everytime I launch “docker-compose up -d”, the mitmproxy container crashes instantly.
Here are the logs about the crash :
Traceback (most recent call last):
File "/usr/bin/mitmproxy", line 11, in <module>
sys.exit(mitmproxy())
File "/usr/lib/python3.6/site-packages/mitmproxy/tools/main.py", line 140, in mitmproxy
run(console.master.ConsoleMaster, cmdline.mitmproxy, args)
File "/usr/lib/python3.6/site-packages/mitmproxy/tools/main.py", line 122, in run
master.run()
File "/usr/lib/python3.6/site-packages/mitmproxy/tools/console/master.py", line 213, in run
self.window = window.Window(self)
File "/usr/lib/python3.6/site-packages/mitmproxy/tools/console/window.py", line 149, in __init__
WindowStack(master, "flowlist"),
File "/usr/lib/python3.6/site-packages/mitmproxy/tools/console/window.py", line 57, in __init__
commands = commands.Commands(master),
File "/usr/lib/python3.6/site-packages/mitmproxy/tools/console/commands.py", line 131, in __init__
oh = CommandHelp(master)
File "/usr/lib/python3.6/site-packages/mitmproxy/tools/console/commands.py", line 107, in __init__
super().__init__(self.widget(""))
File "/usr/lib/python3.6/site-packages/mitmproxy/tools/console/commands.py", line 119, in widget
[urwid.Text(i) for i in textwrap.wrap(txt, cols)]
File "/usr/lib/python3.6/textwrap.py", line 379, in wrap
return w.wrap(text)
File "/usr/lib/python3.6/textwrap.py", line 354, in wrap
return self._wrap_chunks(chunks)
File "/usr/lib/python3.6/textwrap.py", line 248, in _wrap_chunks
raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width 0 (must be > 0)
Is there a solution to that problem ?
Thanks for your answers