Docker 是一个开源的应用容器引擎,可以打包、发布和运行应用。以下是 Docker 的基本安装步骤。
系统要求
在安装 Docker 之前,请确保您的系统满足以下要求:
- Linux 发行版
- 64 位 CPU
- 确保您的系统内核版本至少为 3.10
安装步骤
1. 安装 Docker
以下命令将安装 Docker Engine:
sudo apt-get update
sudo apt-get install docker.io
2. 启动 Docker
安装完成后,启动 Docker 服务:
sudo systemctl start docker
3. 验证安装
要验证 Docker 是否已正确安装,请运行以下命令:
sudo docker run hello-world
如果一切正常,您将看到以下消息:
Hello from Docker!
This message shows that your installation appears to be working correctly.
To verify that everything is working properly, please run the following command:
docker run hello-world
To remove this message, please run the command below in your shell:
sudo apt-get remove docker.io
To see a list of supported Docker versions, please run the command below in your shell:
sudo apt-get autoremove docker.io
扩展阅读
想要了解更多关于 Docker 的信息,请访问我们的 Docker 教程。
Docker 图标