Skip to content

Instantly share code, notes, and snippets.

@ffoxin
Last active October 2, 2023 10:28
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 ffoxin/338ccd4ec811d96d7d557a7eac108077 to your computer and use it in GitHub Desktop.
Save ffoxin/338ccd4ec811d96d7d557a7eac108077 to your computer and use it in GitHub Desktop.
docker compose update script
#!/usr/bin/env bash
#
# INFO:
# This script in current docker compose setup:
# - rebuilds necessary images
# - updates base images
# - restarts everything
# - shows the current status
#
# INSTALLATION:
# wget 'https://gist.githubusercontent.com/ffoxin/338ccd4ec811d96d7d557a7eac108077/raw/update.sh'
#
# USAGE:
# ./update.sh
# self-update
curl --silent --output "update.sh" --time-cond "update.sh" "https://gist.githubusercontent.com/ffoxin/338ccd4ec811d96d7d557a7eac108077/raw/update.sh"
docker compose build
docker compose pull
docker compose down
docker compose up --detach --remove-orphans
docker image prune --force
docker network prune --force
docker compose ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment