How to find Docker images

In this article we’ll look at a couple of different ways to find applications which you can run as Docker containers on your computer, and some tips to help you find good, reliable images. It’s worth noting that you’ll need Docker installed to be able to run the images!

If you’re in a hurry, here’s a quick summary:

What you need to know

  • To run an application in Docker, it needs to be formatted as a Docker image

  • Images for Docker are usually stored in a registry

  • The most popular public registry is Docker Hub

  • You can use a web browser, or docker search <query>, to search for an image in Docker Hub

How do I search for Docker images?

To find applications that run with Docker, you need to look for Docker images, also sometimes called container images.

Images can be published to a registry for sharing. The biggest registry is run by Docker, and is called Docker Hub. You can search and browse for images on Docker Hub in a web browser:

  1. Visit Docker Hub at hub.docker.com in your web browser.

  2. Click Explore to view all images, or enter a search query to find images:

    Search results in Docker Hub

  3. Click on a result to see the image details:

    Viewing an image listing in Docker Hub

    The tags Tab will show you all of the different tags within that image, which you can pull and run with Docker.

Searching with the command line

You can also search for Docker images in Docker Hub using the docker search CLI command:

docker search <query>

This will return all the public Docker Hub registry images that match your search.

Best practices for using public Docker images

As with anything available online, you should be diligent about the images you download and run.

So here are a few best practices to follow:

Check that the image is trustworthy

Anyone can upload images to Docker Hub. So make sure you trust the source of the image you’re going to run. A 2020 survey found that many images on Docker Hub contain malware and vulnerabilities.

On Docker Hub, look out for the “Official Images” and “Verified Publisher” icons, which show whether an image has been published by Docker, or a trusted source. If you’re not sure, it’s best to stick to running containers only from these official maintained images.

Pay attention to when the image was last updated

Most software needs to be regularly updated and patched. The same goes for software distributed in container images. So if you’re running an image which hasn’t been updated in a long time, the application inside the container might have some vulnerabilities which could open you up to attacks. Always use new, up-to-date images.

Be aware of the size of the image

Docker images can take up a lot of space on disk, and large images especially take some time to transfer. If you have a small hard disk drive then be aware that your free disk space might reduce rather quickly once you start pulling lots of images!

The TLDR

You can find Docker images in Docker Hub, or any of the other public registries. Be cautious about what you choose to run, as some images contain malware and harmful content, which you really don’t want running on your laptop, and definitely not on a corporate server.

How do I list all tags for an image?

skopeo is a really simple utility for working with container images. Install skopeo first (on a Mac, you can install it with Homebrew). Then use skopeo’s list-tags command. For example, to list all of the tags for the ubuntu image on Docker Hub, you can use:

skopeo list-tags docker://docker.io/ubuntu

What does “unable to find image locally” mean in Docker?

This usually means that Docker is trying to run an image, but it doesn’t exist on your computer, and Docker can’t find it in a registry either. This tends to happen if you’re trying to run some software which requires you to build the container image yourself first (with a Dockerfile). Or it can also happen if the image only exists in a private registry.

Tom Donohue

By Tom Donohue, Editor | Twitter | LinkedIn

Tom is the founder of Tutorial Works. He’s an engineer and open source advocate. He uses the blog as a vehicle for sharing tutorials, writing about technology and talking about himself in the third person. His very first computer was an Acorn Electron.

Join the discussion

Got some thoughts on what you've just read? Want to know what other people think? Or is there anything technically wrong with the article? (We'd love to know so that we can correct it!) Join the conversation and leave a comment.

Comments are moderated.