#docker install
sudo yum install docker -y
#docker remove
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine docker-ce
#set docker repo and instal docker-ce
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce --allowerasing
#
sudo systemctl start docker
sudo systemctl enable docker
sudo systemctl status docker
#add user to docker group
sudo usermod -aG docker $USER
#docker-compose 설치
sudo curl -L "https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
#docker-compose 실행 권한 부여
sudo chmod +x /usr/local/bin/docker-compose
#설치된 docker-compose 실행 확인
docker-compose --version
반응형