Operations 6 min read

Master Docker Image Management: List, Tag, Push, Save, and Delete

This guide walks through essential Docker image commands—listing, searching, pulling, tagging, pushing, saving, loading, and deleting images—while explaining the underlying UnionFS layer mechanism and offering practical code examples for effective container image management.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Docker Image Management: List, Tag, Push, Save, and Delete
This tutorial series, authorized by WangWang Knowledge Base, continues the Docker image basics. Previously we introduced that a Docker image is a read‑only template and that Docker pulls missing images from Docker Hub.

Exploring More Image Operations

1. List local images
# docker images

REPOSITORY   TAG         IMAGE ID      CREATED         VIRTUAL SIZE
centos       latest      ce20c473cd8a  2 weeks ago     172.3 MB
2. Search images in the default registry
# docker search redis
3. Pull an image to the local host
# docker pull redis

Download progress may be slow from overseas servers; only a few basic images are needed.

4. Add a tag to an image

Tagging gives the image an easy‑to‑understand name and can specify a target repository for later push.

Key information displayed by docker images includes:

REPOSITORY: repository info, e.g., docker.io/redis
TAG: version label, default is latest
IMAGE ID: unique identifier of the image

Two ways to uniquely identify an image:

1. REPOSITORY:TAG (e.g., docker.io/centos:6.6)
2. IMAGE ID (e.g., 12c9d795d85a)
5. Push a modified image to a repository
# docker push 192.168.1.200:5000/centos:6.6
6. Save or load an image

Save an image to a tar file: # docker save -o redis.tar redis Load an image from a tar file:

# docker load --input redis.tar
# docker load < redis.tar

Loading restores the image and its metadata, enabling quick transfer between hosts without a private registry.

7. Delete an image

Remove a local image with:

# docker rmi redis
Untagged: redis:latest
Deleted: c08dd1f8fad9ff2622a1b5d74650a8e494ee380b74030e21584fea05079c2818
...

Note: Before deleting an image, first remove any containers that depend on it using docker rm.

8. How Docker images work

Docker images are built from multiple layers combined by a UnionFS. This allows a read‑only layer to be merged with a writable layer, enabling incremental modifications without altering the original image. Docker’s AUFS implementation follows the same principle.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerContainer ManagementLinux operationsdocker-image
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.