Having problems using key arrows with pry in docker-compose

566 views Asked by At

I'm having a problem using the key arrows with Pry and docker-compose. Every time i try to use the key arrows i'm obtaining ^[[A, for example. If i use irb in the terminal everything works without a problem.

I'm in a mac with BigSur 11.4 and using bash in iTerm.

Can anyone help?

1

There are 1 answers

0
Caner On

I had the same problem on a Docker container hosted on my laptop (macOS Big Sur 11.6) when using the image nginx. My mistake was to access the container by taping docker exec -it CONTAINER_ID /bin/sh instead of /bin/bash.

Once in the container, I solved it by taping /bin/bashin the terminal:

# ^[[A^C
# /bin/bash
root@6200d20b1931:/#