#!/usr/bin/env bash apt update apt install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ lsb-release \ software-properties-common jq DOCKER_COMPOSE_VERSION=$( curl -s 'https://api.github.com/repos/docker/compose/releases' |jq -r .[0].tag_name) mkdir -p /usr/local/share/keyrings curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor | dd of=/usr/local/share/keyrings/docker.gpg echo "deb [signed-by=/usr/local/share/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docekr.list apt update apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin if [ -f "docker-compose-linux-x86_64.xz" ];then unxz docker-compose-linux-x86_64.xz cp -v docker-compose-linux-x86_64 /usr/bin/docker-compose else curl -SL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64" -o /usr/bin/docker-compose fi chmod +x /usr/bin/docker-compose