Last active
July 25, 2021 03:45
-
-
Save upbeta01/bdea18f5803687bb08eb3d25954ec427 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
docker image prune -a -f | |
eval $(aws ecr get-login --no-include-email --region us-west-2) | |
j=0 | |
for i in {9000..9003} | |
do | |
PORT=$i | |
COUNT=$((j++)) | |
docker stop FQDN-$COUNT | |
sleep 10 | |
docker rm FQDN-$COUNT | |
sleep 10 | |
docker run -d --restart=always --name FQDN-$COUNT -p $PORT:9000 REGISTRY/CONTAINER-IMAGE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment