...
Code Block |
---|
$ sudo apt-get update $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common \ qemu-user-static |
リポジトリを追加する(apt-keyコマンドを利用する場合)
Docker社提供のUbuntu用aptリポジトリをシステムに追加します。
...
Code Block | ||
---|---|---|
| ||
$ cat /etc/apt/sources.list (省略) deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable |
リポジトリを追加する(apt-keyコマンドを利用しない場合)
Note |
---|
apt-key コマンドは廃止予定となっておりますので、代替方法の例を示しています。代替方法は各自で検討ください。 |
Docker社提供のUbuntu用aptリポジトリをシステムに追加します。
事前に/etc/aptディレクトリにkeyringsディレクトリを作成します。
Code Block | ||
---|---|---|
| ||
$ mkdir /etc/apt/keyrings |
Docker社オフィシャルPGPキーをシステムに追加します。
Code Block | ||
---|---|---|
| ||
$ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker-key.asc |
次に、Docker公式aptリポジトリをシステムに追加します。
Code Block | ||
---|---|---|
| ||
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker-key.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
Docker実行用ファイルをインストールする
Docker実行に必要なファイルを、aptを使用してインストールします。
...