-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line wrapping issue typing long commands in bash #253
Comments
Opening |
Yes, see #97. The docker client dynamically resizes the pseudo-TTY, which involves repeated POSTs to the Docker API (see cli.monitorTtySize and cli.resizeTtty). We need to do that too. |
Ah cool. I might have a look at this. I actually spent all evening yesterday going down a rabbit hole thinking this was likely to be an issue in SocketClient itself. |
Also out of curiosity, what's the reason for bundling the docker client directly in this repo, rather than referencing it as a dependency in PyPi? |
We used to depend on some features that were not in a released PyPi version of docker-py. It's quite possible that's not the case any longer. |
I'm diffing the two codbases (current master vs your embedded one) and it looks mostly like you're missing new features in the upstream version, but aren't implementing things that don't exist. Have you sent PR's upstream? Might try to undo this and get back onto the official client, so people can send PRs to them before making changes in fig (e.g. docker/docker-py#246 can go with #263). |
Use dockerpty instead for pseudo-tty behaviour (fixes TTY size issue docker#253 & docker#97) Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
…ocker#253) checkpoint image itself. Signed-off-by: Ross Boucher <rboucher@gmail.com>
I still get this all the time running Docker on Mac. I realized that if I simply resize the terminal window after attaching to the container, the problem is fixed. |
@arielpontes thank you! This has been driving me a little loopy, wasn't really sure where the issue lay. |
@arielpontes God bless you ... |
@arielpontes thanks dude! |
This seems to be back in 1.19.0. Running Arch Linux. |
@arielpontes seriously, thank you. |
x-ref: moby/moby#25450 |
@arielpontes thank you so much! =) |
I'm still getting this glitch as well. Thanks @arielpontes for the tip, but it'd be nice if this is resolved to begin with. |
This problem remains on |
Happening for me in |
|
also for me on Ubuntu 16.04 with i3wm |
I've blamed Thanks, @arielpontes, kinda solution. Version 18.03.0-ce-mac60 (23751) |
@arielpontes +1! Thank you! |
You've no idea how much this was annoying me, thanks for the resize fix 👍 |
Thanks @arielpontes, the quick manual resize of the terminal window appears to help with this annoying problem, as far as I can tell with a few tests just now. Crossing my fingers for it to be the workaround that sticks around. Is there any way to script or automate the resize of the terminal window so I can drop it into my .bashrc or something like that? I am in and out of these docker container bash shells often enough that it would be great to through a scripted workaround into my image. Does anyone have a clue what the actual source of this problem could be so it can be investigated and fixed vs a workaround? I only noticed this problem since upgrading a few things a couple months ago like the Docker For Mac version and MacOS from El Capitan to High Sierra. Prior to a couple months ago and those updates, I never had this issue but now I get it all the time. |
I also have this issue in a container shell reached via |
I was going to blame Visual Studio Code, but turns out it's Docker Compose. Manual resizing also fixes the problem. |
Haha, yes, I have been blaming PyCharm for the longest time, but it is, in fact, caused by Docker Compose.
|
docker-compose version 1.21.1 - this still happens to me:
So, is there a workaround? |
@aanand Can you reopen this issue, since it still exists, or was reintroduced? |
After attaching, resize the window! |
We're still seeing the same issue as well and the resizing workaround doesn't work :( . Can we reopen? |
the same problem |
@sophylee I've found a few solutions in MacOS if that helps. One is to set the width once you are inside your bash prompt:
Also, in iTerm2 I edited my profile to set the width of new sessions automatically and now it just works inside my docker container. Open Profiles -> Edit -> Window -> Columns: 270 I hope this helps! |
@smeggingsmegger thanks for the help! I tried both setting |
moby/moby#35407 is now fixed on master through moby/moby#37172 |
@arielpontes 好牛啊 |
@d11wtq why is this closed? it's still an issue. |
This is a 7 year old issue for a bug that was fixed at the time; if you're running into something the looks like this, it's not related to the original issue. If you have details about your issue, and exact steps to reproduce, please open a new ticket instead. |
Seems like |
😞 definitely not related though, because |
Eew, how am I getting this in 2024 with Docker 26.0.0? I did install libcurses in my container and I'm a EDIT: AH HAH! Looks like all of the pseudo-tty kinks aren't quite worked out. I only need to set my little pet
|
I have no idea what might be causing this, but I have confirmed that it only happens when running docker via fig.
If I start a bash shell inside a docker container, then start typing a long command at the bash prompt, I get to maybe 50-60 characters across the window, then the line wraps back on itself and I'm then typing over the top of what I've already written. It doesn't affect the input, only the rendering of the shell.
See copy/paste of an example below. The
|
indicates where the cursor is (this is the end of the line, not the middle of some gibberish).Using the exact same docker image without fig:
The text was updated successfully, but these errors were encountered: