English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Docker 支持以下的 Debian 版本:
Buster 10
Stretch 9 (stable) / Raspbian Stretch
Docker Engine-Community 在 x86_64(或 amd64 )armhf,和 arm64 架构上受支持。
安装命令如下:
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
Puoi anche utilizzare il comando di installazione one-click di daocloud in Cina:
curl -sSL https://get.daocloud.io/docker | sh
Le vecchie versioni di Docker sono chiamate docker, docker.io o docker-engine, se sono installate, disinstallale:
$ sudo apt-get remove docker docker-engine docker.io containerd runc
Prima di installare Docker Engine-Community su un nuovo host, è necessario configurare il repository di Docker. Dopo di che, puoi installare e aggiornare Docker dal repository.
Gli utenti Raspbian non possono utilizzare questo metodo!
Per Raspbian, non è supportato l'uso del repository per l'installazione. Devi utilizzare il modo dello script shell.
Aggiorna l'indice dei pacchetti apt.
$ sudo apt-get update
Installa i pacchetti dipendenti apt per ottenere repository tramite HTTPS.
$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common
Aggiungi la chiave GPG ufficiale di Docker:
$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/debian/gpg | sudo apt-key add -
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 Verifica se possiedi una chiave con il fingerprint cercando gli ultimi 8 caratteri del fingerprint.
$ sudo apt-key fingerprint 0EBFCD88 pub 4096R/0EBFCD88 2017-02-22 Fingerprint chiave = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid Docker Release (CE deb) <[email protected]> sub 4096R/F273FCD8 2017-02-22
Usa le seguenti istruzioni per impostare il deposito stabile:
$ sudo add-apt-repository \ "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian \ $(lsb_release -cs) \ stable"
Aggiorna l'indice dei pacchetti apt:
$ sudo apt-get update
Installa la versione più recente del Docker Engine-Community e containerd, o vai al passo successivo per installare una versione specifica:
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Per installare una versione specifica del Docker Engine-Community, elenca le versioni disponibili nel deposito e seleziona una per l'installazione. Elenca le versioni disponibili nel tuo deposito:
$ apt-cache madison docker-ce docker-ce | 5:18.09.1~3-0~debian-stretch | https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch/stable amd64 Packages docker-ce | 5:18.09.0~3-0~debian-stretch | https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch/stable amd64 Packages docker-ce | 18.06.1~ce~3-0~debian | https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch/stable amd64 Packages docker-ce | 18.06.0~ce~3-0~debian | https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch/stable amd64 Packages ...
使用第二列中的版本字符串安装特定版本,例如 5:18.09.1~3-0~debian-stretch 。
$ sudo apt-get install docker-ce=docker-ce-cli= containerd.io
测试 Docker 是否安装成功,输入以下指令,打印出以下信息则安装成功:
$ sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 1b930d010525: Pull complete Digest: sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5f Stato: Scaricata l'immagine più recente per hello-world:latest Ciao dal Docker! Questo messaggio indica che la tua installazione sembra funzionare correttamente. Per generare questo messaggio, Docker ha seguito i seguenti passaggi: 1. Il client Docker ha contattato il demone Docker. 2. Il demone Docker ha prelevato l'immagine "hello-world" dal Docker Hub. (amd64) 3. Il demone Docker ha creato un nuovo container da quell'immagine che esegue eseguibile che produce l'output che stai attualmente leggendo. 4. Il demone Docker ha inviato l'output al client Docker, che lo ha inviato nel tuo terminale. Per provare qualcosa di più ambizioso, puoi eseguire un container Ubuntu con: $ docker run -it ubuntu bash Condividi immagini, automatizza workflow e altro con un Docker ID gratuito: https://hub.docker.com/ Per ulteriori esempi e idee, visita: https://docs.docker.com/get-started/