Skip to content

Instantly share code, notes, and snippets.

@alxsimo
Created June 6, 2017 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alxsimo/834ea4af5cbc18dbeb9244ff2af04295 to your computer and use it in GitHub Desktop.
Save alxsimo/834ea4af5cbc18dbeb9244ff2af04295 to your computer and use it in GitHub Desktop.
[Docker] Clear all docker images and rebuild
#!/bin/bash
echo "Stoping MA containers"
docker stop $(docker ps | grep "allmaweb_*" | awk '{print $1}')
echo "Deleting MA containers"
docker rmi --force $(docker images | grep "allmaweb_*" | awk '{print $3}')
echo "Rebuilding MA containers"
docker-compose up --build
echo "MA docker images rebuilt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment