OneBite.Dev - Coding blog in a bite size

use docker desktop

Simple docker step by step how to use docker desktop with explanation

Docker Desktop is a user-friendly software that allows you to run applications from your machine in isolated environments known as containers. Here is a simple step-by-step guide on how to use Docker Desktop.

Step 1: Installing Docker Desktop

Before we can get started with using Docker Desktop, you need to install it on your machine. It is compatible with both Mac and Windows. Visit the Docker’s official site, download the appropriate version for your system, and follow the installation wizard to install the Docker Desktop.

Step 2: Log in to Docker Desktop

After installation, open Docker Desktop. If you’re using Docker Desktop for the first time, you’ll be asked to create or log in to a Docker account. If you don’t have one, you can create it via Docker’s official website.

Step 3: Understanding the Interface

Upon successful login, you’re greeted with Docker Desktop’s clean and straightforward interface. On the left sidebar, you’ll see options for Images, Containers/Apps, and other features. On the main screen, you’ll see a welcome message and a handy diagnostic tool that checks if Docker is running correctly.

Step 4: Pulling and Running Docker Images

To get Docker containers, you need to pull Docker images from Docker’s official image repository, Docker Hub.

For instance, to pull an Ubuntu image:

  1. Click on “Images” from the left sidebar.
  2. In the image search bar at the top of the screen, type ‘Ubuntu’ and press Enter.
  3. From the search results, click on the ‘ubuntu’ image and click the ‘Pull’ button. Docker Desktop will start to download the Ubuntu image.

Once it’s downloaded, you can create a new container from this image by selecting it and clicking on the ‘Run’ button. This will open a new dialog asking for configuration settings like the container name, which ports to expose and if the container should run in the background.

Step 5: Managing Docker Containers

After running a Docker image, it becomes a Docker container. To see the list of running containers:

  1. Click on ‘Containers/Apps’ from the left sidebar.
  2. In this screen, you will see a list of all running Docker containers along with details like their state, name, ID, image, ports, and actions you can perform on them.

You can interact with each container using the ‘actions’ buttons to stop, restart, or delete the container.

In conclusion, Docker Desktop provides a user-friendly interface to manage and interact with Docker containers, making it easy to isolate and manage your applications.

docker