Docker Learning Notes (3) How to delete a-docker warehouse image

Source: Internet
Author: User
Tags docker ps
Docker is becoming more and more popular, and if your team is ready to start using Docker, then a private repository is essential, first of all to help you speed up the pull image from the server, and, second, to help you store a private image. This article is about how to open a images backup from a public server to a local private server.
Docker images often fills the hard disk space unconsciously, in order to clean up the redundant image, the following methods can be used:

1. Enter root permissions

sudo su

2. Stop all container so that you can delete the images:

Docker stop $ (Docker ps-a-Q)

If you want to delete all container, add one more command:

Docker RM $ (Docker ps-a-Q)

3. See what images is currently

Docker images

4. Delete the images, by the ID of the image to specify who to delete

Docker RMI <image id>

If you want to delete untagged images, which is the image with ID <None>, you can use

Docker RMI $ (Docker images | grep "^<none>" | awk "{print $}")

To delete all of the image,

Docker RMI $ (Docker images-q)

Docker Learning Notes (3) How to delete a-docker warehouse image

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.