セットアップの流れ
本家サイトにもスタートアップガイドはありますが、記載は必要最低限になっており、初めての方だと迷われるかもしれません。
そこで、初めての方でも迷わないよう、以下のステップに沿ってVPS WebARENA (Indigo) の簡単なセットアップ手順を紹介したいと思います。
以下の手順を確認する際は、サインアップだけでも実施しておくことをおすすめします。
サインアップだけなら料金は発生しないのでご安心ください。
実際の画面を見ながらの方が、断然理解が進むと思います。
dockerインストール
https://www.linuxtechi.com/install-docker-and-docker-compose-rocky-linux/
リポジトリの追加
docker をインストールするためにリポジトリを追加します。
「dnf」は、Red Hat系のLinuxディストリビューションで使われている“RPMパッケージ”を扱うためのパッケージ管理コマンドです。ソフトウェアのインストール(install)や更新(update)、アンインストール(remove)の際に利用します。
CentOS 7が採用している「yum」の後継となるコマンドという位置付けで、yumと同じサブコマンド、オプションを使用可能です。
$ sudo 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
最新化(アップデート)の実行
リポジトリを追加したらアップデートを実行します。
※30分くらいはかかりました。
sudo dnf update
実際にアップデートを実行するまえに、アップデートによって必要となるディスク容量が表示されるので、yse(y)を入力します。
Transaction Summary
============================================================================================================================
Install 9 Packages
Upgrade 250 Packages
Total download size: 462 M
Is this ok [y/N]: y
Downloading Packages:
(1/259): python3-netifaces-0.10.6-4.el8.x86_64.rpm 595 kB/s | 24 kB 00:00
(2/259): NetworkManager-initscripts-updown-1.36.0-4.el8.noarch.rpm 1.1 MB/s | 136 kB 00:00
(3/259): glibc-gconv-extra-2.28-189.1.el8.x86_64.rpm 370 kB/s | 1.5 MB 00:04
(4/259): grub2-tools-efi-2.02-123.el8.x86_64.rpm 84 kB/s | 476 kB 00:05
(5-7/259): kernel-4.18.0-372.9.1.el8.x86_6 3% [=- ] 884 kB/s | 17 MB 08:35 ETA
Complete!
C:\Users\xxxx\.ssh>ssh rocky@164.70.xxx.xxx -p 22 -i private_key_ringo.txt
The authenticity of host '164.70.xxx.xxx (164.70.xxx.xxx)' can't be established.
ECDSA key fingerprint is SHA256:zXrJgLInVBUwTo6UdePNGbozxxxxxxxxxxxxxxxxxxxx
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '164.70.xxx.xxx' (ECDSA) to the list of known hosts.
Activate the web console with: systemctl enable --now cockpit.socket
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: GPG check FAILED
dockerインストール
sudo dnf -y install docker-ce
Last metadata expiration check: 0:20:52 ago on Sun 19 Jun 2022 09:31:47 AM UTC.
Dependencies resolved.
============================================================================================================================
Package Architecture Version Repository Size
============================================================================================================================
Installing:
docker-ce x86_64 3:20.10.17-3.el8 docker-ce-stable 22 M
Installing dependencies:
container-selinux noarch 2:2.179.1-1.module+el8.6.0+971+69b94baf appstream 57 k
containerd.io x86_64 1.6.6-3.1.el8 docker-ce-stable 33 M
docker-ce-cli x86_64 1:20.10.17-3.el8 docker-ce-stable 29 M
docker-ce-rootless-extras x86_64 20.10.17-3.el8 docker-ce-stable 4.7 M
fuse-common x86_64 3.3.0-15.el8 baseos 21 k
fuse-overlayfs x86_64 1.8.2-1.module+el8.6.0+971+69b94baf appstream 72 k
fuse3 x86_64 3.3.0-15.el8 baseos 53 k
fuse3-libs x86_64 3.3.0-15.el8 baseos 94 k
iptables x86_64 1.8.4-22.el8 baseos 584 k
libcgroup x86_64 0.41-19.el8 baseos 69 k
libnetfilter_conntrack x86_64 1.0.6-5.el8 baseos 63 k
libnfnetlink x86_64 1.0.1-13.el8 baseos 32 k
libnftnl x86_64 1.1.5-5.el8 baseos 82 k
libslirp x86_64 4.4.0-1.module+el8.6.0+971+69b94baf appstream 69 k
slirp4netns x86_64 1.1.8-2.module+el8.6.0+971+69b94baf appstream 50 k
Installing weak dependencies:
docker-scan-plugin x86_64 0.17.0-3.el8 docker-ce-stable 3.8 M
Enabling module streams:
container-tools rhel8
Transaction Summary
============================================================================================================================
Install 17 Packages
Total download size: 94 M
Installed size: 392 M
Downloading Packages:
(1/17): container-selinux-2.179.1-1.module+el8.6.0+971+69b94baf.noarch.rpm 1.2 MB/s | 57 kB 00:00
(2/17): libslirp-4.4.0-1.module+el8.6.0+971+69b94baf.x86_64.rpm 1.3 MB/s | 69 kB 00:00
(3/17): fuse-overlayfs-1.8.2-1.module+el8.6.0+971+69b94baf.x86_64.rpm 1.3 MB/s | 72 kB 00:00
(4/17): slirp4netns-1.1.8-2.module+el8.6.0+971+69b94baf.x86_64.rpm 4.6 MB/s | 50 kB 00:00
(5/17): fuse-common-3.3.0-15.el8.x86_64.rpm 258 kB/s | 21 kB 00:00
(6/17): fuse3-3.3.0-15.el8.x86_64.rpm 553 kB/s | 53 kB 00:00
(7/17): fuse3-libs-3.3.0-15.el8.x86_64.rpm 968 kB/s | 94 kB 00:00
(8/17): libcgroup-0.41-19.el8.x86_64.rpm 50 kB/s | 69 kB 00:01
(9/17): libnfnetlink-1.0.1-13.el8.x86_64.rpm 273 kB/s | 32 kB 00:00
(10/17): libnetfilter_conntrack-1.0.6-5.el8.x86_64.rpm 42 kB/s | 63 kB 00:01
(11/17): libnftnl-1.1.5-5.el8.x86_64.rpm 1.6 MB/s | 82 kB 00:00
(12/17): iptables-1.8.4-22.el8.x86_64.rpm 188 kB/s | 584 kB 00:03
(13/17): docker-ce-20.10.17-3.el8.x86_64.rpm 4.1 MB/s | 22 MB 00:05
(14/17): docker-ce-rootless-extras-20.10.17-3.el8.x86_64.rpm 3.6 MB/s | 4.7 MB 00:01
(15/17): docker-scan-plugin-0.17.0-3.el8.x86_64.rpm 3.6 MB/s | 3.8 MB 00:01
(16/17): containerd.io-1.6.6-3.1.el8.x86_64.rpm 4.0 MB/s | 33 MB 00:08
(17/17): docker-ce-cli-20.10.17-3.el8.x86_64.rpm 3.9 MB/s | 29 MB 00:07
----------------------------------------------------------------------------------------------------------------------------
Total 8.2 MB/s | 94 MB 00:11
Docker CE Stable - x86_64 20 kB/s | 1.6 kB 00:00
Importing GPG key 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
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : docker-scan-plugin-0.17.0-3.el8.x86_64 1/17
Running scriptlet: docker-scan-plugin-0.17.0-3.el8.x86_64 1/17
Installing : docker-ce-cli-1:20.10.17-3.el8.x86_64 2/17
Running scriptlet: docker-ce-cli-1:20.10.17-3.el8.x86_64 2/17
Installing : libnfnetlink-1.0.1-13.el8.x86_64 3/17
Running scriptlet: libnfnetlink-1.0.1-13.el8.x86_64 3/17
Installing : fuse3-libs-3.3.0-15.el8.x86_64 4/17
Running scriptlet: fuse3-libs-3.3.0-15.el8.x86_64 4/17
Running scriptlet: container-selinux-2:2.179.1-1.module+el8.6.0+971+69b94baf.noarch 5/17
Installing : container-selinux-2:2.179.1-1.module+el8.6.0+971+69b94baf.noarch 5/17
Running scriptlet: container-selinux-2:2.179.1-1.module+el8.6.0+971+69b94baf.noarch 5/17
Installing : containerd.io-1.6.6-3.1.el8.x86_64 6/17
Running scriptlet: containerd.io-1.6.6-3.1.el8.x86_64 6/17
Installing : libnetfilter_conntrack-1.0.6-5.el8.x86_64 7/17
Running scriptlet: libnetfilter_conntrack-1.0.6-5.el8.x86_64 7/17
Installing : libnftnl-1.1.5-5.el8.x86_64 8/17
Running scriptlet: libnftnl-1.1.5-5.el8.x86_64 8/17
Running scriptlet: iptables-1.8.4-22.el8.x86_64 9/17
Installing : iptables-1.8.4-22.el8.x86_64 9/17
Running scriptlet: iptables-1.8.4-22.el8.x86_64 9/17
Running scriptlet: libcgroup-0.41-19.el8.x86_64 10/17
Installing : libcgroup-0.41-19.el8.x86_64 10/17
Running scriptlet: libcgroup-0.41-19.el8.x86_64 10/17
Installing : fuse-common-3.3.0-15.el8.x86_64 11/17
Installing : fuse3-3.3.0-15.el8.x86_64 12/17
Installing : fuse-overlayfs-1.8.2-1.module+el8.6.0+971+69b94baf.x86_64 13/17
Running scriptlet: fuse-overlayfs-1.8.2-1.module+el8.6.0+971+69b94baf.x86_64 13/17
Installing : libslirp-4.4.0-1.module+el8.6.0+971+69b94baf.x86_64 14/17
Installing : slirp4netns-1.1.8-2.module+el8.6.0+971+69b94baf.x86_64 15/17
Installing : docker-ce-rootless-extras-20.10.17-3.el8.x86_64 16/17
Running scriptlet: docker-ce-rootless-extras-20.10.17-3.el8.x86_64 16/17
Installing : docker-ce-3:20.10.17-3.el8.x86_64 17/17
Running scriptlet: docker-ce-3:20.10.17-3.el8.x86_64 17/17
Running scriptlet: container-selinux-2:2.179.1-1.module+el8.6.0+971+69b94baf.noarch 17/17
Running scriptlet: docker-ce-3:20.10.17-3.el8.x86_64 17/17
Verifying : container-selinux-2:2.179.1-1.module+el8.6.0+971+69b94baf.noarch 1/17
Verifying : fuse-overlayfs-1.8.2-1.module+el8.6.0+971+69b94baf.x86_64 2/17
Verifying : libslirp-4.4.0-1.module+el8.6.0+971+69b94baf.x86_64 3/17
Verifying : slirp4netns-1.1.8-2.module+el8.6.0+971+69b94baf.x86_64 4/17
Verifying : fuse-common-3.3.0-15.el8.x86_64 5/17
Verifying : fuse3-3.3.0-15.el8.x86_64 6/17
Verifying : fuse3-libs-3.3.0-15.el8.x86_64 7/17
Verifying : iptables-1.8.4-22.el8.x86_64 8/17
Verifying : libcgroup-0.41-19.el8.x86_64 9/17
Verifying : libnetfilter_conntrack-1.0.6-5.el8.x86_64 10/17
Verifying : libnfnetlink-1.0.1-13.el8.x86_64 11/17
Verifying : libnftnl-1.1.5-5.el8.x86_64 12/17
Verifying : containerd.io-1.6.6-3.1.el8.x86_64 13/17
Verifying : docker-ce-3:20.10.17-3.el8.x86_64 14/17
Verifying : docker-ce-cli-1:20.10.17-3.el8.x86_64 15/17
Verifying : docker-ce-rootless-extras-20.10.17-3.el8.x86_64 16/17
Verifying : docker-scan-plugin-0.17.0-3.el8.x86_64 17/17
Installed:
container-selinux-2:2.179.1-1.module+el8.6.0+971+69b94baf.noarch
containerd.io-1.6.6-3.1.el8.x86_64
docker-ce-3:20.10.17-3.el8.x86_64
docker-ce-cli-1:20.10.17-3.el8.x86_64
docker-ce-rootless-extras-20.10.17-3.el8.x86_64
docker-scan-plugin-0.17.0-3.el8.x86_64
fuse-common-3.3.0-15.el8.x86_64
fuse-overlayfs-1.8.2-1.module+el8.6.0+971+69b94baf.x86_64
fuse3-3.3.0-15.el8.x86_64
fuse3-libs-3.3.0-15.el8.x86_64
iptables-1.8.4-22.el8.x86_64
libcgroup-0.41-19.el8.x86_64
libnetfilter_conntrack-1.0.6-5.el8.x86_64
libnfnetlink-1.0.1-13.el8.x86_64
libnftnl-1.1.5-5.el8.x86_64
libslirp-4.4.0-1.module+el8.6.0+971+69b94baf.x86_64
slirp4netns-1.1.8-2.module+el8.6.0+971+69b94baf.x86_64
Complete!
インストール確認
$ docker -v
Docker version 20.10.17, build 100c701
起動します。
sudo systemctl enable docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
sudo systemctl start docker
docker-composeのインストール
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 12.1M 100 12.1M 0 0 7978k 0 0:00:01 0:00:01 --:--:-- 9437k
$ sudo chmod +x /usr/local/bin/docker-compose
$ docker-compose --version
docker-compose version 1.29.2, build 5becea4c
$ docker-compose up
Traceback (most recent call last):
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1277, in request
File "http/client.py", line 1323, in _send_request
File "http/client.py", line 1272, in endheaders
File "http/client.py", line 1032, in _send_output
File "http/client.py", line 972, in send
File "docker/transport/unixconn.py", line 43, in connect
PermissionError: [Errno 13] Permission denied
$ sudo gpasswd -a $USER docker
Adding user rocky to group docker
$ exit
$ docker-compose up
Creating network "minecraft_default" with the default driver
Pulling minecraft-server (itzg/minecraft-server:multiarch)...
ERROR: manifest for itzg/minecraft-server:multiarch not found: manifest unknown: manifest unknown