Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
Kubernetes即学即用(第二版)
by
Brendan Burns
,
Joe Beda
,
Kelsey Hightower
June 2021
Intermediate to advanced
300 pages
5h 4m
Chinese
China Electric Power Press Ltd.
Content preview from
Kubernetes即学即用(第二版)
36
|
第
2
章
--publish 8080:8080 \
--memory 200m \
--memory-swap 1G \
--cpu-shares 1024 \
gcr.io/kuar-demo/kuard-amd64:blue
2.6
清理
在实验完毕镜像构建后,你可以通过
docker rmi
命令将其删除:
docker rmi <
标签名称
>
或者:
docker rmi <
镜像
ID>
我们可以通过标签名称(例如
gcr.io/kuar-demo/kuard-amd64:blue
)或镜像
ID
删除镜像。与
docker
工具中所有的
ID
值一样,镜像
ID
只需写出前几个字符,
只要保证唯一即可。通常写
3
~
4
个字符就足够了。
重要的是要注意,除非你明确删除镜像,否则即便构建一个同名的新镜像,
原来的镜像也会永久地存在于系统中。构建新镜像只是将标签转移到了新镜
像上,并不会删除或替换旧镜像。
因此,在创建新镜像时采用迭代的方式,通常会创建许多不同的镜像,最终
会占用很多不必要的计算机空间。
如果想查看计算机上当前的镜像,则可以使用
docker
images
命令。过后再
删除不再使用的标签。
Docker
提供了一个名为
docker
system
prune
的工具,可用于常规清理。这
个工具将删除所有停止的容器、所有未标记的镜像以及构建过程中缓存下来
的所有未使用的镜像层。请小心使用。
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
PyTorch深度学习
Posts & Telecom Press, Vishnu Subramanian
Python数据分析
Posts & Telecom Press, Ivan Idris
Python贝叶斯分析(第2版)
Posts & Telecom Press, Osvaldo Martin
Python高级编程(第2版)
Posts & Telecom Press, Michał Jaworski, Tarek Ziadé
Publisher Resources
ISBN: 9787519856762