Skip to content

Instantly share code, notes, and snippets.

@ConorShore
Created February 7, 2022 16:44
Show Gist options
  • Save ConorShore/36192e4af89be83b0f78ffffd5e50ae3 to your computer and use it in GitHub Desktop.
Save ConorShore/36192e4af89be83b0f78ffffd5e50ae3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Make sure to run this script from where your docker-compose.yml is
docker volume ls | grep sonarqube | cut -d ' ' -f 6 | xargs docker volume inspect | grep Mountpoint | cut -d '"' -f 4 | xargs sudo zip -r sonarbk.zip
docker-compose down
docker-compose pull
docker-compose up -d --remove-orphans
docker image prune -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment