Automatic docker-compose update script

If you have installed docker-compose locally, this will perform a live update, i.e. docker-compose services can still be running using the old version.

Keep in mind that doing this without shutting down all docker-compose services beforehand might cause data loss for you, even though it worked fine for me!

Run this script as root! Adjust the version and architecture by copying the current link from the releases page

#!/bin/bash
export COMPOSE_PATH=$(which docker-compose)
# Unlink to avoid "Text busy" error
unlink $COMPOSE_PATH
# Download new file
wget -O $COMPOSE_PATH $ https://github.com/docker/compose/releases/download/v2.28.1/docker-compose-linux-x86_64
# Make it executable
chmod a+x $COMPOSE_PATH
# Check if it worked
echo "You should now see the new version:"
$COMPOSE_PATH version