Skip to content

Instantly share code, notes, and snippets.

@mengjiann
Created April 4, 2019 06:31
Show Gist options
  • Save mengjiann/adfa8a8be9138cecd4339b287e1c0763 to your computer and use it in GitHub Desktop.
Save mengjiann/adfa8a8be9138cecd4339b287e1c0763 to your computer and use it in GitHub Desktop.
AWS ECS Restart Script
# stop the ecs agent
sudo stop ecs
# remove exited container
docker ps -qa --filter "status=exited" | xargs docker rm
# prune unused docker volume
docker volume prune
# stop the ecs agent
sudo start ecs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment