We have the problem that our containers don’t restart after a reboot. Adapting the cleanup command to our needs here, we’re able to restart all containers that stopped less than 10 minutes ago:
docker inspect -f '{{.Id}},{{.State.Running}},{{.State.FinishedAt}}' $(docker ps -qa) | \
awk -F, '$2=="false" && $3 > strftime("%FT%T.000000000Z",systime()-60*10) {print $1;}' | \
xargs -n1 docker start