CentOS8.3にDockerをインストールする方法
OSバージョンの確認
# cat /etc/redhat-release
CentOS Linux release 8.3.2011
更新
# dnf -y update
リポジトリの追加
1.リポジトリの状態の確認
# dnf repolist
repo id repo name
appstream CentOS Linux 8 – AppStream
baseos CentOS Linux 8 – BaseOS
extras
CentOS Linux 8 – Extras
2.リポジトリを追加
# dnf config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
3.再度確認
# dnf repolist
repo id repo name
appstream CentOS Linux 8 – AppStream
baseos CentOS Linux 8 – BaseOS
docker-ce-stable Docker CE Stable – x86_64
extras CentOS Linux 8 – Extras
4.dockerをインストール
# dnf -y install docker-ce docker-ce-cli containerd.io
略
Installed:
container-selinux-2:2.155.0-1.module_el8.3.0+699+d61d9c41.noarch
containerd.io-1.4.4-3.1.el8.x86_64
docker-ce-3:20.10.5-3.el8.x86_64
docker-ce-cli-1:20.10.5-3.el8.x86_64
docker-ce-rootless-extras-20.10.5-3.el8.x86_64
fuse-overlayfs-1.3.0-2.module_el8.3.0+699+d61d9c41.x86_64
fuse3-3.2.1-12.el8.x86_64
fuse3-libs-3.2.1-12.el8.x86_64
libslirp-4.3.1-1.module_el8.3.0+475+c50ce30b.x86_64
slirp4netns-1.1.8-1.module_el8.3.0+699+d61d9c41.x86_64
Complete!
5.Dokcerの起動
# systemctl start docker
自動起動を有効にする
# systemctl enable docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
ステータスの状態
# systemctl status docker
● docker.service – Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor pres>
Active: active (running) since Wed 2021-03-23 17:06:08 JST; 1min 0s ago
バージョンの確認
# docker –version
Docker version 20.10.5, build 55c4c8