いろいろやってみるにっき

てきとーに生きている奴の日記

https化に伴い、表示できなくなっているリンクについて修復中。
2018年から遡って修正し、2015年分まで修正完了。


WSL2のOracle LinuxにDocker その1

WSLでOS用意したらDockerを動かしてみたい。

 

shigeo-t.hatenablog.com

 

この手順でやってみる。

qiita.com

 

まあ入っていないのは確認済だけど、削除コマンド投入。

f:id:shigeo-t:20220208040000p:plain

 

続いて必要なパッケージをインストール。

[shigeo@EAGLEII shigeo-t]$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Loaded plugins: ovl, ulninfo
ol7_latest                                                                                       | 3.6 kB  00:00:00
Package yum-utils-1.1.31-54.0.1.el7_8.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-persistent-data.x86_64 0:0.8.5-3.el7_9.2 will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64
---> Package lvm2.x86_64 7:2.02.187-6.0.5.el7_9.5 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.187-6.0.5.el7_9.5 for package: 7:lvm2-2.02.187-6.0.5.el7_9.5.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.187-6.0.5.el7_9.5.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.187-6.0.5.el7_9.5.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.187-6.0.5.el7_9.5.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.187-6.0.5.el7_9.5.x86_64
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.170-6.0.5.el7_9.5 will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package lvm2-libs.x86_64 7:2.02.187-6.0.5.el7_9.5 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.170-6.0.5.el7_9.5 for package: 7:lvm2-libs-2.02.187-6.0.5.el7_9.5.x86_64
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.170-6.0.5.el7_9.5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                                 Arch             Version                            Repository            Size
========================================================================================================================
Installing:
 device-mapper-persistent-data           x86_64           0.8.5-3.el7_9.2                    ol7_latest           422 k
 lvm2                                    x86_64           7:2.02.187-6.0.5.el7_9.5           ol7_latest           1.3 M
Installing for dependencies:
 device-mapper-event                     x86_64           7:1.02.170-6.0.5.el7_9.5           ol7_latest           192 k
 device-mapper-event-libs                x86_64           7:1.02.170-6.0.5.el7_9.5           ol7_latest           192 k
 libaio                                  x86_64           0.3.109-13.el7                     ol7_latest            24 k
 lvm2-libs                               x86_64           7:2.02.187-6.0.5.el7_9.5           ol7_latest           1.1 M

Transaction Summary
========================================================================================================================
Install  2 Packages (+4 Dependent packages)

Total download size: 3.2 M
Installed size: 8.1 M
Downloading packages:
(1/6): device-mapper-event-1.02.170-6.0.5.el7_9.5.x86_64.rpm                                     | 192 kB  00:00:00
(2/6): device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64.rpm                                  | 422 kB  00:00:00
(3/6): libaio-0.3.109-13.el7.x86_64.rpm                                                          |  24 kB  00:00:00
(4/6): device-mapper-event-libs-1.02.170-6.0.5.el7_9.5.x86_64.rpm                                | 192 kB  00:00:00
(5/6): lvm2-2.02.187-6.0.5.el7_9.5.x86_64.rpm                                                    | 1.3 MB  00:00:00
(6/6): lvm2-libs-2.02.187-6.0.5.el7_9.5.x86_64.rpm                                               | 1.1 MB  00:00:00
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   5.8 MB/s | 3.2 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 7:device-mapper-event-libs-1.02.170-6.0.5.el7_9.5.x86_64                                             1/6
  Installing : libaio-0.3.109-13.el7.x86_64                                                                         2/6
  Installing : device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64                                                 3/6
  Installing : 7:device-mapper-event-1.02.170-6.0.5.el7_9.5.x86_64                                                  4/6
Failed to get D-Bus connection: Operation not permitted
warning: %post(device-mapper-event-7:1.02.170-6.0.5.el7_9.5.x86_64) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package 7:device-mapper-event-1.02.170-6.0.5.el7_9.5.x86_64
  Installing : 7:lvm2-libs-2.02.187-6.0.5.el7_9.5.x86_64                                                            5/6
  Installing : 7:lvm2-2.02.187-6.0.5.el7_9.5.x86_64                                                                 6/6
Failed to get D-Bus connection: Operation not permitted
Failed to get D-Bus connection: Operation not permitted
Failed to get D-Bus connection: Operation not permitted
warning: %post(lvm2-7:2.02.187-6.0.5.el7_9.5.x86_64) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package 7:lvm2-2.02.187-6.0.5.el7_9.5.x86_64
  Verifying  : 7:device-mapper-event-1.02.170-6.0.5.el7_9.5.x86_64                                                  1/6
  Verifying  : 7:lvm2-2.02.187-6.0.5.el7_9.5.x86_64                                                                 2/6
  Verifying  : device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64                                                 3/6
  Verifying  : 7:lvm2-libs-2.02.187-6.0.5.el7_9.5.x86_64                                                            4/6
  Verifying  : libaio-0.3.109-13.el7.x86_64                                                                         5/6
  Verifying  : 7:device-mapper-event-libs-1.02.170-6.0.5.el7_9.5.x86_64                                             6/6

Installed:
  device-mapper-persistent-data.x86_64 0:0.8.5-3.el7_9.2              lvm2.x86_64 7:2.02.187-6.0.5.el7_9.5

Dependency Installed:
  device-mapper-event.x86_64 7:1.02.170-6.0.5.el7_9.5      device-mapper-event-libs.x86_64 7:1.02.170-6.0.5.el7_9.5
  libaio.x86_64 0:0.3.109-13.el7                           lvm2-libs.x86_64 7:2.02.187-6.0.5.el7_9.5

Complete!

 

リポジトリ追加。

[shigeo@EAGLEII shigeo-t]$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: ovl
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo

 

yumのパッケージインデックスを更新。

[shigeo@EAGLEII shigeo-t]$ sudo yum makecache fast
Loaded plugins: ovl, ulninfo
docker-ce-stable                                                                                 | 3.5 kB  00:00:00
ol7_latest                                                                                       | 3.6 kB  00:00:00
(1/2): docker-ce-stable/7Server/x86_64/updateinfo                                                |   55 B  00:00:00
(2/2): docker-ce-stable/7Server/x86_64/primary_db                                                |  70 kB  00:00:00
Metadata Cache Created

 

バージョン指定はしないのでインストール可能なバージョンは調べず、最新版インストール。

[shigeo@EAGLEII shigeo-t]$ sudo yum install docker-ce
Loaded plugins: ovl, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:20.10.12-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-20.10.12-3.el7.x86_64
--> Processing Dependency: containerd.io >= 1.4.1 for package: 3:docker-ce-20.10.12-3.el7.x86_64
--> Processing Dependency: libseccomp >= 2.3 for package: 3:docker-ce-20.10.12-3.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-20.10.12-3.el7.x86_64
--> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-20.10.12-3.el7.x86_64
--> Processing Dependency: iptables for package: 3:docker-ce-20.10.12-3.el7.x86_64
--> Processing Dependency: libcgroup for package: 3:docker-ce-20.10.12-3.el7.x86_64
--> Running transaction check
---> Package containerd.io.x86_64 0:1.4.12-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.4.12-3.1.el7.x86_64
---> Package docker-ce.x86_64 3:20.10.12-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-20.10.12-3.el7.x86_64
---> Package docker-ce-cli.x86_64 1:20.10.12-3.el7 will be installed
--> Processing Dependency: docker-scan-plugin(x86-64) for package: 1:docker-ce-cli-20.10.12-3.el7.x86_64
---> Package docker-ce-rootless-extras.x86_64 0:20.10.12-3.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-20.10.12-3.el7.x86_64
--> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-20.10.12-3.el7.x86_64
---> Package iptables.x86_64 0:1.4.21-35.0.1.el7 will be installed
--> Processing Dependency: libnetfilter_conntrack.so.3()(64bit) for package: iptables-1.4.21-35.0.1.el7.x86_64
--> Processing Dependency: libnfnetlink.so.0()(64bit) for package: iptables-1.4.21-35.0.1.el7.x86_64
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
---> Package libseccomp.x86_64 0:2.3.1-4.el7 will be installed
--> Running transaction check
---> Package containerd.io.x86_64 0:1.4.12-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.4.12-3.1.el7.x86_64
---> Package docker-ce.x86_64 3:20.10.12-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-20.10.12-3.el7.x86_64
---> Package docker-ce-rootless-extras.x86_64 0:20.10.12-3.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-20.10.12-3.el7.x86_64
--> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-20.10.12-3.el7.x86_64
---> Package docker-scan-plugin.x86_64 0:0.12.0-3.el7 will be installed
---> Package libnetfilter_conntrack.x86_64 0:1.0.6-1.el7_3 will be installed
---> Package libnfnetlink.x86_64 0:1.0.1-4.el7 will be installed
--> Finished Dependency Resolution
Error: Package: docker-ce-rootless-extras-20.10.12-3.el7.x86_64 (docker-ce-stable)
           Requires: slirp4netns >= 0.4
Error: Package: 3:docker-ce-20.10.12-3.el7.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2:2.74
Error: Package: containerd.io-1.4.12-3.1.el7.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2:2.74
Error: Package: docker-ce-rootless-extras-20.10.12-3.el7.x86_64 (docker-ce-stable)
           Requires: fuse-overlayfs >= 0.7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

 

さて起動してみる。

f:id:shigeo-t:20220208040959p:plain

まあ「権限ねえよ」である。

 

増殖版Ubuntuとは違うエラーである。

shigeo-t.hatenablog.com

 

ということで時間が掛かりそうなので、続きは別途。あっさり動いてくれればEC2でAmazon Linux 2と似たような環境を作りやすいなと思ったんだが。