[Debian 10] docker安裝
發表於 : 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:
2.Add Docker’s official GPG key
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.
4.Install Docker Engine
Docker Compose安裝
https://docs.docker.com/compose/install/
參考網址: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代碼: 選擇全部
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -代碼: 選擇全部
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"代碼: 選擇全部
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.iohttps://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