k8sは僕の環境では大きすぎるので、
もっと手軽なwebguiを探したところ、
Portainerが良さげだったので使ってみます。
https://www.portainer.io
まずはDockerのインストールですが
Ubuntuの標準リポジトリだと古いので、
公式のものを使います。
$ sudo cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
インストールをはじめましょ
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
$
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$
$ sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker@docker.com>
sub rsa4096 2017-02-22 [S]
$
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$
$ sudo apt-get update
$
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
$
$ sudo docker -v
Docker version 18.09.1, build 4c52b90
ここまででDockerのインストールはおしまい。
ホストを再起動したら落ちてしまうので、
対策として、
$ sudo systemctl enable docker.service
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
これで再起動してもDocker自体は動いてくれます。
次にPortainerをインストールします、
というかこれもDockerコンテナで動かします。
続きを読む →