Created
April 4, 2019 06:31
-
-
Save mengjiann/adfa8a8be9138cecd4339b287e1c0763 to your computer and use it in GitHub Desktop.
AWS ECS Restart Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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