[Debian 10] docker安裝

回覆文章
Lexaul
文章: 231
註冊時間: 2019-10-18, 14:28

[Debian 10] docker安裝

文章 Lexaul » 2021-02-03, 17:03

Docker安裝
參考網址:https://docs.docker.com/engine/install/ ... on-methods

1.Update the apt package index and install packages to allow apt to use a repository over HTTPS:

代碼: 選擇全部

$ sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
2.Add Docker’s official GPG key

代碼: 選擇全部

$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
3.Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.

代碼: 選擇全部

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"
4.Install Docker Engine

代碼: 選擇全部

 $ sudo apt-get update
 $ sudo apt-get install docker-ce docker-ce-cli containerd.io
Docker Compose安裝
https://docs.docker.com/compose/install/

代碼: 選擇全部

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

代碼: 選擇全部

sudo chmod +x /usr/local/bin/docker-compose
[email protected]
github.com/Lexaul

回覆文章