参考: 公式
- 前提パッケージをインストール
$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common
- GCP公開鍵のインストール
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- フィンガープリントの確認
$ sudo apt-key fingerprint 0EBFCD88
- リポジトリの設定(stable) ※ fish shell
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu "(lsb_release -cs)" stable"
- Dockerのインストール
$ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io
$ sudo docker version Client: Docker Engine - Community Version: 19.03.12S