From 432fb6ff2510456d8a697d4c082c4601c802dc7c Mon Sep 17 00:00:00 2001 From: Eliezer Croitoru Date: Mon, 26 Aug 2024 02:41:01 +0300 Subject: [PATCH] 1 --- install-docker.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 install-docker.sh diff --git a/install-docker.sh b/install-docker.sh new file mode 100755 index 0000000..3df8481 --- /dev/null +++ b/install-docker.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +dnf install curl jq -y + +dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + +dnf remove -y runc + +dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin + +DOCKER_COMPOSE_VERSION=$( curl -s 'https://api.github.com/repos/docker/compose/releases' |jq -r .[0].tag_name) + +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 +