Docker検証用にローカルの自宅サーバーにRocky Linux8 VMを建ててみました。インストールの途中でエラーが出ましたが解決したのでめも。
EC-CUBEという通販アプリをダウンロード途中までインストールしたのですがPHP composerで動かなかったので docker-compose による起動もできるというのでDocker環境を構築しました。
Install Docker Engine on CentOS | Docker Docs
Docker公式ドキュメントによりyum-utils パッケージをインストールします。
$ sudo dnf install -y yum-utils
続いてconfig-manager からdocker リポジトリを導入。
$ sudo yum-config-manager --add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
docker-ce をインストールしようとしたところでエラーがでました。
# dnf install docker-ce docker-ce-cli containerd.io
これはpodman と runc が競合しているためとのことで–allowerasing オプションを付けると良いとのことでした。
[root@ec2 ~]# LANG=C dnf install -y docker-ce docker-ce-cli containerd.io Last metadata expiration check: 0:01:36 ago on Sun Apr 2 14:59:22 2023. Error: Problem 1: problem with installed package podman-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 - package podman-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed - package podman-3:4.2.0-6.module+el8.7.0+1122+04a7498b.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed - package podman-3:4.2.0-8.module+el8.7.0+1154+147ffa21.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed - package containerd.io-1.6.20-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - cannot install the best candidate for the job - package runc-1.0.0-66.rc10.module+el8.5.0+770+e2f49861.x86_64 is filtered out by modular filtering - package runc-1.0.0-73.rc95.module+el8.7.0+1076+9b1c11c1.x86_64 is filtered out by modular filtering - package runc-1.0.0-73.rc95.module+el8.7.0+1152+ac778627.x86_64 is filtered out by modular filtering - package runc-1:1.1.4-1.module+el8.7.0+1077+0e4f03d4.x86_64 is filtered out by modular filtering - package runc-1:1.1.4-1.module+el8.7.0+1153+b4f255b5.x86_64 is filtered out by modular filtering Problem 2: problem with installed package podman-catatonit-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 - package podman-catatonit-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 requires podman = 3:4.2.0-4.module+el8.7.0+1078+e72fcd4f, but none of the providers can be installed - package podman-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed - package containerd.io-1.6.4-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.4-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.4-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.4-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.4-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.4-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package docker-ce-3:23.0.2-1.el8.x86_64 requires containerd.io >= 1.6.4, but none of the providers can be installed - package containerd.io-1.6.6-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.6-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.6-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.6-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.6-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.6-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.10-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.10-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.11-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.11-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.12-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.12-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.13-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.13-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.14-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.14-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.15-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.15-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.16-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.16-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.18-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.18-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.19-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.19-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.7-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.7-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.8-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.8-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.9-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - package containerd.io-1.6.9-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 - cannot install the best candidate for the job - package runc-1.0.0-66.rc10.module+el8.5.0+770+e2f49861.x86_64 is filtered out by modular filtering - package runc-1.0.0-73.rc95.module+el8.7.0+1076+9b1c11c1.x86_64 is filtered out by modular filtering - package runc-1.0.0-73.rc95.module+el8.7.0+1152+ac778627.x86_64 is filtered out by modular filtering - package runc-1:1.1.4-1.module+el8.7.0+1077+0e4f03d4.x86_64 is filtered out by modular filtering - package runc-1:1.1.4-1.module+el8.7.0+1153+b4f255b5.x86_64 is filtered out by modular filtering - package containerd.io-1.6.7-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.7-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.7-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.7-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.8-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.8-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.8-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.8-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.9-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.9-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.9-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.9-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.10-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.10-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.10-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.10-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.11-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.11-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.11-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.11-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.12-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.12-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.12-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.12-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.13-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.13-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.13-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.13-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.14-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.14-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.14-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.14-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.15-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.15-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.15-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.15-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.16-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.16-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.16-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.16-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.18-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.18-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.18-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.18-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.19-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.19-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.19-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.19-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1122+04a7498b.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 conflicts with runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package containerd.io-1.6.20-3.1.el8.x86_64 obsoletes runc provided by runc-1:1.1.4-1.module+el8.7.0+1154+147ffa21.x86_64 - package podman-catatonit-3:4.2.0-6.module+el8.7.0+1122+04a7498b.x86_64 requires podman = 3:4.2.0-6.module+el8.7.0+1122+04a7498b, but none of the providers can be installed - package podman-3:4.2.0-6.module+el8.7.0+1122+04a7498b.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed - package podman-catatonit-3:4.2.0-8.module+el8.7.0+1154+147ffa21.x86_64 requires podman = 3:4.2.0-8.module+el8.7.0+1154+147ffa21, but none of the providers can be installed - package podman-3:4.2.0-8.module+el8.7.0+1154+147ffa21.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
再びオプションを付けてインストールすると今度はうまく行ったようです。
# dnf install --allowerasing docker-ce docker-ce-cli containerd.io
[root@ec2 ~]# dnf install --allowerasing docker-ce docker-ce-cli containerd.io メタデータの期限切れの最終確認: 0:00:26 時間前の 2023年04月02日 15時02分27秒 に実施しました。 依存関係が解決しました。 ============================================================================================================================================================================================================================================= パッケージ アーキテクチャー バージョン リポジトリー サイズ ============================================================================================================================================================================================================================================= インストール: containerd.io x86_64 1.6.20-3.1.el8 docker-ce-stable 34 M 置き換え runc.x86_64 1:1.1.4-1.module+el8.7.0+1078+e72fcd4f docker-ce x86_64 3:23.0.2-1.el8 docker-ce-stable 23 M docker-ce-cli x86_64 1:23.0.2-1.el8 docker-ce-stable 7.1 M 依存関係のインストール: docker-ce-rootless-extras x86_64 23.0.2-1.el8 docker-ce-stable 4.8 M libcgroup x86_64 0.41-19.el8 baseos 69 k 弱い依存関係のインストール: docker-buildx-plugin x86_64 0.10.4-1.el8 docker-ce-stable 12 M docker-compose-plugin x86_64 2.17.2-1.el8 docker-ce-stable 12 M docker-scan-plugin x86_64 0.23.0-3.el8 docker-ce-stable 3.8 M 依存関係パッケージの削除: buildah x86_64 1:1.27.2-2.module+el8.7.0+1078+e72fcd4f @AppStream 26 M cockpit-podman noarch 53-1.module+el8.7.0+1078+e72fcd4f @AppStream 548 k containers-common x86_64 2:1-43.module+el8.7.0+1078+e72fcd4f @AppStream 410 k podman x86_64 3:4.2.0-4.module+el8.7.0+1078+e72fcd4f @AppStream 41 M podman-catatonit x86_64 3:4.2.0-4.module+el8.7.0+1078+e72fcd4f @AppStream 764 k トランザクションの概要 ============================================================================================================================================================================================================================================= インストール 8 パッケージ 削除 5 パッケージ ダウンロードサイズの合計: 97 M これでよろしいですか? [y/N]: y パッケージのダウンロード: (1/8): libcgroup-0.41-19.el8.x86_64.rpm 506 kB/s | 69 kB 00:00 (2/8): docker-buildx-plugin-0.10.4-1.el8.x86_64.rpm 8.5 MB/s | 12 MB 00:01 (3/8): docker-ce-cli-23.0.2-1.el8.x86_64.rpm 9.1 MB/s | 7.1 MB 00:00 (4/8): docker-ce-rootless-extras-23.0.2-1.el8.x86_64.rpm 8.4 MB/s | 4.8 MB 00:00 (5/8): docker-compose-plugin-2.17.2-1.el8.x86_64.rpm 9.1 MB/s | 12 MB 00:01 (6/8): docker-scan-plugin-0.23.0-3.el8.x86_64.rpm 8.8 MB/s | 3.8 MB 00:00 (7/8): docker-ce-23.0.2-1.el8.x86_64.rpm 2.3 MB/s | 23 MB 00:09 (8/8): containerd.io-1.6.20-3.1.el8.x86_64.rpm 3.0 MB/s | 34 MB 00:11 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 合計 8.3 MB/s | 97 MB 00:11 Docker CE Stable - x86_64 19 kB/s | 1.6 kB 00:00 GPG 鍵 0x621E9F35 をインポート中: Userid : "Docker Release (CE rpm) <docker@docker.com>" Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35 From : https://download.docker.com/linux/centos/gpg これでよろしいですか? [y/N]: y 鍵のインポートに成功しました トランザクションの確認を実行中 トランザクションの確認に成功しました。 トランザクションのテストを実行中 トランザクションのテストに成功しました。 トランザクションを実行中 準備 : 1/1 scriptletの実行中: docker-scan-plugin-0.23.0-3.el8.x86_64 1/1 インストール中 : docker-scan-plugin-0.23.0-3.el8.x86_64 1/14 scriptletの実行中: docker-scan-plugin-0.23.0-3.el8.x86_64 1/14 インストール中 : docker-compose-plugin-2.17.2-1.el8.x86_64 2/14 scriptletの実行中: docker-compose-plugin-2.17.2-1.el8.x86_64 2/14 インストール中 : docker-buildx-plugin-0.10.4-1.el8.x86_64 3/14 scriptletの実行中: docker-buildx-plugin-0.10.4-1.el8.x86_64 3/14 インストール中 : docker-ce-cli-1:23.0.2-1.el8.x86_64 4/14 scriptletの実行中: docker-ce-cli-1:23.0.2-1.el8.x86_64 4/14 インストール中 : containerd.io-1.6.20-3.1.el8.x86_64 5/14 scriptletの実行中: containerd.io-1.6.20-3.1.el8.x86_64 5/14 scriptletの実行中: libcgroup-0.41-19.el8.x86_64 6/14 インストール中 : libcgroup-0.41-19.el8.x86_64 6/14 scriptletの実行中: libcgroup-0.41-19.el8.x86_64 6/14 インストール中 : docker-ce-rootless-extras-23.0.2-1.el8.x86_64 7/14 scriptletの実行中: docker-ce-rootless-extras-23.0.2-1.el8.x86_64 7/14 インストール中 : docker-ce-3:23.0.2-1.el8.x86_64 8/14 scriptletの実行中: docker-ce-3:23.0.2-1.el8.x86_64 8/14 削除 : buildah-1:1.27.2-2.module+el8.7.0+1078+e72fcd4f.x86_64 9/14 削除 : cockpit-podman-53-1.module+el8.7.0+1078+e72fcd4f.noarch 10/14 scriptletの実行中: podman-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 11/14 削除 : podman-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 11/14 scriptletの実行中: podman-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 11/14 削除 : containers-common-2:1-43.module+el8.7.0+1078+e72fcd4f.x86_64 12/14 削除 : podman-catatonit-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 13/14 廃止 : runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 14/14 scriptletの実行中: runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 14/14 検証 : libcgroup-0.41-19.el8.x86_64 1/14 検証 : containerd.io-1.6.20-3.1.el8.x86_64 2/14 検証 : runc-1:1.1.4-1.module+el8.7.0+1078+e72fcd4f.x86_64 3/14 検証 : docker-buildx-plugin-0.10.4-1.el8.x86_64 4/14 検証 : docker-ce-3:23.0.2-1.el8.x86_64 5/14 検証 : docker-ce-cli-1:23.0.2-1.el8.x86_64 6/14 検証 : docker-ce-rootless-extras-23.0.2-1.el8.x86_64 7/14 検証 : docker-compose-plugin-2.17.2-1.el8.x86_64 8/14 検証 : docker-scan-plugin-0.23.0-3.el8.x86_64 9/14 検証 : buildah-1:1.27.2-2.module+el8.7.0+1078+e72fcd4f.x86_64 10/14 検証 : cockpit-podman-53-1.module+el8.7.0+1078+e72fcd4f.noarch 11/14 検証 : containers-common-2:1-43.module+el8.7.0+1078+e72fcd4f.x86_64 12/14 検証 : podman-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 13/14 検証 : podman-catatonit-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 14/14 インストール済み: containerd.io-1.6.20-3.1.el8.x86_64 docker-buildx-plugin-0.10.4-1.el8.x86_64 docker-ce-3:23.0.2-1.el8.x86_64 docker-ce-cli-1:23.0.2-1.el8.x86_64 docker-ce-rootless-extras-23.0.2-1.el8.x86_64 docker-compose-plugin-2.17.2-1.el8.x86_64 docker-scan-plugin-0.23.0-3.el8.x86_64 libcgroup-0.41-19.el8.x86_64 削除しました: buildah-1:1.27.2-2.module+el8.7.0+1078+e72fcd4f.x86_64 cockpit-podman-53-1.module+el8.7.0+1078+e72fcd4f.noarch containers-common-2:1-43.module+el8.7.0+1078+e72fcd4f.x86_64 podman-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 podman-catatonit-3:4.2.0-4.module+el8.7.0+1078+e72fcd4f.x86_64 完了しました!</docker@docker.com>
一般ユーザーに Dockerの実行を許可するには usermod -aG オプションでdockerグループに加えます。
$ sudo usermod -aG docker $USER
それでもRocky Linuxでは /var/run/docker.sock のPermission deniedエラーが発生するようでした。そんな時は以下URLの対策も行った上で docker.sock の ユーザー権限を 666 に設定すると良かったです。
$ sudo chmod 666 /var/run/docker.sock
docker-compose のインストールは以下のサイトが参考になりました。
最初にプラグインディレクトリを作成して実行ファイルを curl で格納していきます。
$ sudo mkdir -p /usr/local/lib/docker/cli-plugins
バージョンを変数に設定して・・・
$ VER=2.4.1
ファイル本体をダウンロード。
$ sudo curl \
-L https://github.com/docker/compose/releases/download/v${VER}/docker-compose-$(uname -s)-$(uname -m) \
-o /usr/local/lib/docker/cli-plugins/docker-compose
実行権限を付与してシンボリックリンクを設定すれば完了しました。
$ sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
$ sudo ln -s /usr/local/lib/docker/cli-plugins/docker-compose /usr/bin/docker-compose
$ docker-compose --version
Docker Compose version v2.4.1
Docker公式の Docker Compose のインストール | Docker Docs も参考になりました。
最後までお読みいただきありがとうございました。