惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

博客园 - 鹅要长大

【c++编程基础】理解lambda表达式 【c++编程基础】字节对齐pack的理解 【c++编程基础】虚函数virtual的理解与使用 【linux基础知识】理解nohup 【linux基础】如何理解python train_dtld.py 2>&1 | tee my_error_log.txt 【基础算法】银行家舍入法 【ubuntu工具】ubuntu好用工具总结 【ubuntu基础工具使用】ubuntu中screen的安装与使用 【linux操作基础】多目录文件复制且同名不覆盖 【linux基础操作】windows系统生成的txt文件在ubuntu打开乱码 【opencv编程基础】fillpoly和polylines函数的理解 【c++编程基础】std::unique的理解 【编程基础】计算三个顶点之间的夹角 【计算几何算法】道格拉斯普克(Douglas-Peuker)算法 [c++]c++ 工程代码中的debug时条件编译隐去的代码会影响程序运行的性能和耗时吗 【CV基础】语义分割任务计算类别权重 【opencv基础】resize使用的问题 git stash的用法 gflags的使用 opencv 判断某个坐标点是否在多边形内cv::pointPolygonTest 判断多边形的顶点内外角点以及对approxPolyDP函数的理解 用Python从零实现贝叶斯分类器 【CV数据集】智慧城市之CCPD车牌数据集
【工具使用】docker的使用
鹅要长大 · 2026-04-01 · via 博客园 - 鹅要长大

前言

docker是一种开源的容器化平台,提供了一种轻量级、可移植和自暴寒的容器化环境。容器共享主机内核,轻量/隔离且高效,不想虚拟机需要完整的操作系统。

容器化技术

docker是客户端-服务器架构,上层是多个容器,每个容器独立运行;中间层是docker,负责管理这些容器;底层是主机操作系统和基础设施,为容器提供硬件和系统支持。

docker在运行时分为dockers引擎(服务端守护进程)和客户端工具,日常使用的docker命令其实就是在使用客户端工具和docker引擎进行交互。

Host主机(docker引擎)

一个物理或者虚拟的机器用于执行docker守护进程和容器。

Image镜像

docker镜像就是一个linux的文件系统,包含可以运行在linux内核的程序及相应的数据。

Container容器

惊险共和容器的关系,就像是面向对象程序设计中的类和实例一样,镜像是静态的定义,容器是镜像运行时的实体。容器可以被创建/启动/停滞/删除/暂停等。

docker命令

docker run load -i  docker_image.tar # 加载镜像文件
docker image ls # 查看镜像列表,注意image ID
docker container ls # 查看容器列表
docker run -it -d -v  # 启动新的容器
docker start container_id/name
docker attach container_id/name
docker stop container_id/name # 停止容器
docker ps
docker pull # 从镜像仓库拉取镜像
docker images # 本地镜像列表
docker rm # 删除容器
docker exec -it container_name /bin/bash # 进入容器的交互式终端
docker version 
docker stats # 显示容器的实时资源使用情况

问题

使用docker attach没反应,之后使用docker exec -it 可以进入容器;

参考

1. 菜鸟教程-docker

2. 【docker x3】配置地平线提供的docker开发环境

3. docker的架构及工作原理(详解)

各美其美,美美与共,不和他人作比较,不对他人有期待,不批判他人,不钻牛角尖。
心正意诚,做自己该做的事情,做自己喜欢做的事情,安静做一枚有思想的技术媛。

Simple is clean. Complex is clever.
Logic & Aesthetics
Seeking Ground Truth within the pixels.

版权声明,转载请注明出处:https://www.cnblogs.com/happyamyhope/