Last active
November 1, 2023 23:45
-
-
Save gartisk/07614a3ad918a5951ccf0d7ea60bb17b to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# sudo curl -fsSL <this_script_raw_path> | bash | |
# Change to latest version from https://github.com/docker/compose/releases | |
DOCKER_COMPOSE_VERSION="v2.23.0" | |
# Check if Docker Compose is already installed | |
if [ -x "$(command -v docker-compose)" ]; then | |
echo "Docker Compose is already installed." | |
exit 1; | |
fi | |
# Define the version you want to install | |
VERSION="v2.23.0" # Replace with the desired version | |
# Download Docker Compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
# Make Docker Compose executable | |
sudo chmod +x /usr/local/bin/docker-compose | |
# Verify installation | |
if [ -x "$(command -v docker-compose)" ]; then | |
echo "Docker Compose $VERSION has been successfully installed." | |
else | |
echo "Failed to install Docker Compose." | |
exit 1 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment