stopされているコンテナを立ち上げる

LINEで送る
Pocket

$ docker start $(docker ps -a | awk '$7="Exited" {print $1}' | grep -v CONTAINER)
  • cron
# crontab -l
@reboot while true; do  docker start $(docker ps -a | awk '$7="Exited" {print $1}' | grep -v CONTAINER); sleep 20s; done

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *