Docker

Deleting unnecessary Images and Containers in Docker

Updated: March 4, 2022 By: A Goodman

This concise article shows you how to remove unused containers and images from your computer to gain free disk space. First, check images space usage, containers space usage, local volumes usage, and build cache usage by…

Docker Desktop: Change images & containers directory

Updated: September 12, 2022 By: A Goodman

Under some circumstances, you might want to change the folder that stores your Docker images and containers. For example, you are running Docker Desktop on a Windows laptop or a Macbook with only 256GB or 512GB…

How to Install Docker Compose on Ubuntu 21.04 and 21.10

Updated: November 15, 2021 By: A Goodman

This short article shows you how to set up Docker Compose on Ubuntu 21.04 or 21.10. Before getting started, make sure you have Docker Engine installed (note that Docker Compose doesn’t come with Docker Engine on…

Docker: How to Retag an Image

Updated: November 14, 2021 By: Napoleon

You can retag a Docker image referenced by name and tag as follows: Example: You can also tag/retag an image with its ID: Further reading Start, Pause, Restart, Stop, and Delete a Docker Container How to…

Start, Pause, Restart, Stop, and Delete a Docker Container

Updated: November 14, 2021 By: Napoleon

This short article lists the most important commands you need to know for managing the lifecycle of a Docker container. Starting a Docker container This command is used to start a new container from a single…

Docker: How to Name or Rename a Container

Updated: November 9, 2021 By: A Goodman

You can do everything you want with a Docker container just by using its ID. That being said, giving a container a meaningful and human-friendly name will make your day more joyful and convenient. Naming To…

How to Delete Docker Images on your System

Updated: September 11, 2022 By: A Goodman

Overview If there are some pulled images that are no longer needed, then you can remove them from your system to free up your storage with the following command: rm stands for remove. One important thing…

How to Get the Size of a Docker Image

Updated: September 11, 2022 By: A Goodman

This article shows you how to determine the size of a Docker image that is hosted on Docker Hub or a Docker image that was pulled to your local system. Docker Hub’s Images Go to the…

Docker: How to List Running and Stopped Containers

Updated: November 2, 2021 By: A Goodman

In order to view running Docker containers on your machine, you can use the following command: You will see something like this: To list both running and stopped containers, you can add -a flag: Further reading:…

Docker: Execute Commands inside a Running Container

Updated: November 2, 2021 By: A Goodman

To access the terminal of a running container, you can use the following command: Or: You can also replace sh with bash. Note: To exit the container without stopping or killing it, you can press Ctrl…

Docker: How to See All Pulled Images

Updated: November 3, 2021 By: A Goodman

In order to list all images on your Docker host, you can run the following command: The result you get depends on what images you have pulled before. Here’s mine: Each image in the list comes…

Installing Docker on Ubuntu 21.04, 21.10, and 20.04

Updated: November 1, 2021 By: A Goodman

This short and straight-to-the-point article shows you how to install Docker on Ubuntu 21.04 and 21.10 (it also works fine on Ubuntu 20.04 LTS). Without any further ado, let’s see the steps to get the job…

1 2