Created
July 24, 2017 13:49
-
-
Save andkirby/9c28c2bb9932388e7eaa039cba97af57 to your computer and use it in GitHub Desktop.
Uninstall script for opal-satis containers.
This file contains hidden or 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
#!/usr/bin/env bash | |
set -o pipefail | |
set -o errexit | |
set -o nounset | |
#set -o xtrace | |
# Set magic variables for current file & dir | |
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")" | |
readonly __dir __file | |
docker-compose --file ${__dir}/docker-compose.yml down || true | |
if docker images --filter=reference='*_satis:latest' --format='{{.Repository}}' | grep satis > /dev/null; then | |
docker rmi -f $(\ | |
docker images --filter=reference='*_satis:latest' --format='{{.Repository}}') || true | |
fi | |
docker rmi -f composer/satis || true | |
docker rmi -f ilagnev/alpine-nginx-lua || true | |
if docker volume ls | grep -E '_(api|opal.*)-vol' > /dev/null; then | |
docker volume rm $(\ | |
docker volume ls | grep -E '_(api|opal.*)-vol' | awk '{print $2}') || true | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment