[docker] docker 설치하기

2023 단어 dockerdocker

docker 설치하기

1. Amazon-linux 환경에서 docker 설치

  • docker 설치
sudo yum -y upgrade
sudo yum -y install docker
docker -v
sudo service docker start
sudo usermod -aG docker ec2-user
  • docker-compose 설치
sudo curl -L https://github.com/docker/compose/releases/download/1.25.0\

# 실행 권한 추가
sudo chmod +x /usr/local/bin/docker-compose

docker-compose -v

2. ubuntu 18.04 환경에서 docker 설치

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
  • sudo apt install docker-ce
  • sudo systemctl status docker // 도커 설치 확인

좋은 웹페이지 즐겨찾기