install-gns3-debian12/install-docker.sh
2024-01-26 03:27:06 +02:00

35 lines
952 B
Bash
Executable File

#!/usr/bin/env bash
nala update
nala 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)
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
true | apt-key fingerprint 0EBFCD88
true | add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
nala update
nala 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