docker exec -it returns “cannot enable tty mode on non tty input”
Running docker exec -i instead of docker exec -it fixed my issue. Indeed, my script was launched by CRONTAB which isn’t a terminal. As a reminder: Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG…] Run a command in a running container -i, –interactive=false Keep STDIN open even if not attached -t, –tty=false Allocate a pseudo-TTY