Use the -T option
0 4 * * * docker-compose exec {container_name} {some_command}
0 4 * * * docker-compose exec -T {container_name} {some_command}
I'm not sure, but docker-compose exec is assigned a pseudo tty by default.
The option to cancel it is -T
.
-T Disable pseudo-tty allocation. By default
docker-compose exec
allocates a TTY.
https://docs.docker.com/compose/reference/exec/
Recommended Posts