codingstuff.io
ExploreTutorialsProblemsCS Subjects
Get Started
ExploreTutorialsProblemsCS Subjects
Get Started
codingstuff.io

Master the art of building software through interactive tutorials, real-world problems, and guided projects.

Pune, Maharashtra, India

codingstuffmail@gmail.com

Product

  • Explore
  • Tutorials
  • Problems
  • CS Subjects

Company

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 codingstuff.io. All rights reserved.

Built with ❤️ for developers everywhere

/
/
All Tutorials
🐳

Docker

21 / 60 topics
20Docker Desktop21Docker Machine36Docker Desktop Advanced37Docker Machine Advanced52Docker Desktop Advanced Topics53Docker Machine Advanced Topics
Tutorials/Docker/Docker Management
🐳Docker

Docker Management

Updated 2026-05-15
10 min read

Docker Management

Introduction

In the world of containerization, managing multiple Docker hosts can become cumbersome. While Docker Machine was once a popular tool for this purpose, it is now deprecated in favor of more modern solutions like Docker Desktop and docker context. These tools offer enhanced functionality and better integration with cloud services.

Docker Desktop provides a comprehensive environment for developing, testing, and deploying containerized applications. It supports various drivers for different platforms, including virtualization software like VirtualBox, cloud providers such as AWS, DigitalOcean, and Google Cloud Platform, and more. This flexibility makes it a powerful tool for developers looking to manage multiple Docker environments efficiently.

Concept

At its core, Docker Desktop is a command-line utility that creates hosts for running Docker containers. It abstracts the underlying infrastructure details, allowing you to focus on developing and deploying your applications without worrying about the specifics of each host.

Here are some key concepts related to Docker Management:

  • Host: A machine where Docker is installed and can run containers.
  • Driver: The backend that Docker Desktop uses to create and manage hosts. Examples include VirtualBox, AWS, DigitalOcean, etc.
  • Context: An instance managed by Docker Desktop, which includes the host and its configuration.

Examples

Installing Docker Desktop

Before you can use Docker Desktop, you need to install it on your local machine. Follow these steps to install Docker Desktop:

  1. Download the latest version of Docker Desktop from the official website.
  2. Install Docker Desktop following the instructions provided for your operating system.
Terminal
{`# For Windows and macOS, follow the installation wizard.
# For Linux, you can use the package manager of your distribution.`}

Creating a Docker Host

Once Docker Desktop is installed, you can create a new host using one of the supported drivers. For this example, we'll use VirtualBox as the driver.

Terminal
{`$ docker context create virtualbox my-docker-host --virtualbox-memory 2048 --virtualbox-cpu-count 2`}

This command creates a new Docker host named my-docker-host using the VirtualBox driver. The process might take a few minutes, depending on your system's performance and network speed.

Listing Contexts

To see all the contexts managed by Docker Desktop, use the following command:

Terminal
{`$ docker context ls`}
Output
{`NAME            DESCRIPTION                               DOCKER ENDPOINT               KUBERNETES ENDPOINT   ORCHESTRATOR
default         Current Docker Desktop context                unix:///var/run/docker.sock   https://kubernetes.docker.internal:6443   swarm
my-docker-host  VirtualBox context for my-docker-host           tcp://192.168.99.100:2376   -                     `}

Starting and Stopping Contexts

You can start or stop a Docker host using the start and stop commands:

Terminal
{`$ docker context use my-docker-host
$ docker context use default`}

Using a Context

To use a specific context, you need to switch the context to that machine. This is done using the docker context use command.

Terminal
{`$ docker context use my-docker-host`}

This command sets up your shell environment to use my-docker-host. You can verify this by running:

Terminal
{`$ docker ps`}

Removing a Context

If you no longer need a context, you can remove it using the rm command:

Terminal
{`$ docker context rm my-docker-host`}

This will delete the host and all its associated resources.

What's Next?

Now that you have a basic understanding of Docker Management with Docker Desktop, you might want to explore more advanced features and integrations. For example, you can use Docker Desktop with cloud providers like AWS or DigitalOcean to manage remote hosts. Additionally, you can learn how to automate the creation and management of Docker environments using scripts and configuration files.

In the next section, we will dive into Docker Hub, where you can find and share Docker images for various applications and services.


PreviousDocker DesktopNext Docker Hub

Recommended Gear

Docker DesktopDocker Hub