Join egghead, unlock knowledge.

Want more egghead? It's 45% off for a limited time only!

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock All Content for 45% Off

Already subscribed? Sign In

Save 45% for a limited time.

Get access to all courses and lessons on egghead today.

Autoplay

    Download and Remove Docker Images

    Mark ShustMark Shust

    Learn the basics of downloading and pulling Docker images from Docker Hub. Learn the difference between default tags and version specific tags. Also learn how to display all images, and different ways to remove images.

    dockerDocker
    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    00:00 Let's download our first image by typing docker pull mongo. This will download the image from the mongo repository. By default, docker pulls images from docker hub.

    00:11 You can visit hub.docker.com to search through a list of available images. If no tag is provided, docker pulls images with the latest tag. Download a specific version of a docker image by appending a colon with a tag, or version to the end of the image name.

    00:29 Let's download another image. Note that official docker images only have one name, while community submitted images are name spaced with a user name, and a slash. Let's see which images are downloaded into our machine by typing docker images.

    00:47 We can see the images along with the tag, image ID, when they were created, and the size. To remove an image, type docker rmi, and then, the image name. You can also remove a specific tag by appending it to the image name.

    01:04 Another way to remove an image is by the image ID. Note that you don't need to use the full ID, but just the first few letters as long as it has uniqueness between the other downloaded image IDs.

    Discuss

    Discuss