Docker 설치 공식 가이드 for CentOS
OS 요구 사항
To install Docker CE, you need a maintained version of CentOS 7. Archived versions aren’t supported or tested.
The
centos-extrasrepository must be enabled. This repository is enabled by default, but if you have disabled it, you need to re-enable it.The
overlay2storage driver is recommended.출처
Docker Engine - Community
- For Docker Engine - Community, only some configurations are tested, and your operating system’s kernel may not support every storage driver. In general, the following configurations work on recent versions of the Linux distribution:
Linux distribution Recommended storage drivers Alternative drivers Docker Engine - Community on Ubuntu overlay2oraufs(for Ubuntu 14.04 running on kernel 3.13)overlay¹,devicemapper²,zfs,vfsDocker Engine - Community on Debian overlay2(Debian Stretch),aufsordevicemapper(older versions)overlay¹,vfsDocker Engine - Community on CentOS overlay2overlay¹,devicemapper²,zfs,vfsDocker Engine - Community on Fedora overlay2overlay¹,devicemapper²,zfs,vfsSupported backing filesystems
- With regard to Docker, the backing filesystem is the filesystem where
/var/lib/docker/is located. Some storage drivers only work with specific backing filesystems.
Storage driver Supported backing filesystems overlay2,overlayxfswith ftype=1,ext4aufsxfs,ext4devicemapperdirect-lvmbtrfsbtrfszfszfsvfsany filesystem
Uninstall old versions
$ sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
Docker CE 설치
- 저장소를 설정하고 설치하는 방법 : 가장 일반적인 방법으로 설치 및 업그레이드 작업을 쉽게하기 위해
- 수동으로 설치 : PM 패키지를 다운로드하여 수동으로 설치 하고 업그레이드를 완전히 수동으로 관리 (for not Internet)
- 자동화된 스크립트로 설치 : 테스트 및 개발 환경에서 사용하여 Docker를 설치
저장소를 설정하고 설치하는 방법
필수 패키지 설치
$ sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
Stable repository 설정
$ sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
Docker CE 설치
최신 버전설치
$ sudo yum install docker-ce docker-ce-cli containerd.io
특정 버전설치
$ yum list docker-ce --showduplicates | sort -r docker-ce.x86_64 3:18.09.1-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable $ sudo yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io