0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

KAGOYA VPSのUbuntu 20.04にDockerをインストールしてみる

Posted at

KAGOYA VPSを契約したのでUbuntu 20.04にDockerを入れてみる。

Dockerインストール

下記のDocker docsに従います。
https://docs.docker.com/engine/install/ubuntu/

Docker入っていたら消す。

$ sudo apt-get remove docker docker-engine docker.io containerd runc

リポジトリのセットアップ

$ sudo apt-get update
$ sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
$ sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

$ echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
$ docker -v

Docker version 20.10.21, build baeda1f
以上でインストール完了です。

Docker-composeのインストール

インストール(ビルド不要)

$ sudo curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose

アップデート

$ docker-compose migrate-to-labels

アンインストール

$ sudo rm /usr/local/bin/docker-compose
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?