在Debian 12系统上安装Docker
创作时间:
作者:
@小白创作中心
在Debian 12系统上安装Docker
引用
CSDN
1.
https://m.blog.csdn.net/weixin_43846408/article/details/137608975
Docker 是一个开源的容器引擎,可以让开发者打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。本文将详细介绍如何在 Debian 12 系统上安装 Docker。
安装
安装 Docker 需要以下条件:
- 已经安装的 Debian 12 系统 (VM 或硬件服务器)
- root 权限
可以使用以下命令安装 Docker:
sudo su &&
apt update &&
apt install ca-certificates curl gnupg apt-transport-https gpg
下载 GPG 密钥并将其存储在系统中:
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" |tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
安装 Docker 包:
apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose
验证
可以使用以下命令检查 Docker 是否安装成功并是否在系统启动时自动启动:
systemctl is-active docker
测试
也可以通过启动 hello-world Docker镜像来测试安装是否成功:
docker run hello-world
如果一切正常,将看到类似以下输出:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
478afc919002: Pull complete
Digest: sha256:03b30c6a3c320ff172b52bd68eddffde6ded08ce47e650fe52de861c5e9df46d
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(arm64v8)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
更多信息
有关 Docker 的更多信息,请参阅以下页面:
- Docker 官方文档:https://docs.docker.com/get-started/
- Docker Hub:https://hub.docker.com/
热门推荐
精选"翰"字男孩最佳组合名字大全及寓意解析
老旧小区下水道总是堵住了,自己疏通不了,尝试这个有效的方法!?
陶瓷礼品的选购指南:送礼的最佳选择
目标检测评价指标详解(mAP、AP、FPS)
农业种植大棚智能化控制方案详解
提升面对复杂系统问题的诊断能力
啾c物理治疗师:手指灵活运动,预防板机指
司马迁与《史记》|星岛教室
辟谣!去牙科诊所洗牙会不会得传染病?正规口腔科概率极低
闲谈中国古代天文知识之黄道
历史跨越千年,南北横跨千里,“超时空”对话溯源中华文明
中成药和西药哪个好 中成药与西药的区别有哪些
治疗便秘的中成药及西药的区别及应用是什么
低空经济探索,无人机春季研学活动详解
国家矿山应急救援队开展无人机专项训练,提升实战化训练水平
企业收取的管理费如何缴税?
管理费属于什么应税项目
留学美国的签证流程及奖学金申请指南
大而化之的成语接龙
如何让你的智能家居更安全?五步打造无懈可击的家庭防护!
跨部门协作中,如何确保绩效指标的一致性与协同性?
吸附性义齿需要天天洗牙吗?需要哦!每日进食后都建议清洗
实话讲!吸附式假牙能用多少年受众多因素影响,平均使用寿命大概在5年到15年之间!
夫妻休闲娱乐活动推荐:从户外到居家的二人世界
镁:轻质结构的奇迹金属
什么是二构工程项目管理
男性BMI指数标准表:全面解析男生BMI正常范围与健康指南
如何选择合适的电瓶充电器以防止亏电?
被誉为明镜的魏征,敢于直言进谏,死后不久却被唐太宗毁了墓碑
退休当月能领养老金吗?