In this article we’ll look at a couple of different ways that you can find applications which you can run as Docker containers on your computer, and some tips to help you find good images. It’s worth noting: you’ll need Docker installed to be able to run the images!
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 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 using your web browser:
Visit Docker Hub at hub.docker.com in your web browser.
Click Explore to view all images, or enter a search query to find images:
Click on a result to see the image details:
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.
What to look out for when downloading public Docker images
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!
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-tagscommand. 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.
Got any thoughts on what you've just read? Anything wrong, or no longer correct? Sign in with your GitHub account to leave a comment.
(All comments get added as Issues in our GitHub repo here, using the comments tool Utterances)