1.Docker的版本
- Docker Engine - Community
- Docker Engine - Enterprise
- Docker Enterprise
2.Docker的安装
-
Docker Desktop for Windows
- Windows 10 64-bit: Pro, Enterprise, or Education (Build 15063 or later).
- 必须激活Windows平台特性:Hyper-V and Containers
- 硬件需求:64位处理器,4G内存,BIOS虚拟化启用
-
Docker Desktop for Mac
- 2010年后的Mac硬件
- macOS为10.12以后
- 4G内存
- 与低版本的VirtualBox不兼容(>4.3.30)
-
Docker Engine - Community for Linux
- CentOS
- Fedora
- Debian
- Ubuntu
-
Docker Engine - Community for Ubuntu
- Disco 19.04
- Cosmic 18.10
- Bionic 18.04.3 (LTS)
- Xenial 16.04 (LTS)
- Focal 20.04(LTS)
3.代码记录
https://docs.docker.com/install/linux/docker-ce/ubuntu/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| $ sudo apt update $ sudo apt upgrade $ sudo apt autoremove
$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
$ apt-key list
$ sudo apt-key fingerprint 0EBFCD88
$ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
$ lsb_release -cs
$ cat /etc/apt/sources.list|grep docker
$ sudo apt update $ sudo apt upgrade
$ apt show docker-ce $ sudo apt install docker-ce docker-ce-cli containerd.io44
$ docker help $ docker version $ sudo docker run hello-world
|