#! /bin/bash # sudo로 실행 필요 # docker 설치 OS=`cat /etc/issue | awk '{print $1}'` if [ "$OS" == "Ubuntu" ];then OS_VERSION=ubuntu elif [ "$OS" == "Debian" ];then OS_VERSION=debian fi apt-get update apt-get install -y ca-certificates curl gnupg lsb-release wget git make mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/${OS_VERSION}/gpg -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.asc echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/${OS_VERSION} \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null apt-get update apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin # Cgroup를 systemd로 설정 cat > /etc/docker/daemon.json <