← Blog

cron do not execute script with docker exec -it

1 minEN

cron do not execute script with docker exec -it

Guys this took my life really...

So here the tip.
If you're looking to execute a command inside the shell of a docker container, from the host and you notice that typing it manually is working but with cron is not working this is the problem

docker exec -u root -it

do not put the t so do like this instead

docker exec -u root -i