How To Use Docker Desktop To Deploy Docker Containerized Applications (original) (raw)

Last Updated : 23 Jul, 2025

Docker Desktop is an user-friendly tool that simplifies the deployment of Docker containerized applications on your local machine. It provides a graphical interface for managing containers, images, and volumes, making it accessible for developers and DevOps professionals. In this guide, we will walk you through the essential steps of using Docker Desktop, from installation to deploying a simple Nginx application.

Table of Content

What is Docker Desktop?

Docker Desktop is a lightweight virtualization platform that enables you to run containers on your local machine. Docker Containers are portable and self-contained units that encapsulate an application and its dependencies. Docker Desktop streamlines the development, testing, and deployment processes, making it an integral part of modern application development workflows.

Installation of Docker Desktop

Before we delve into deploying containerized applications, let's get Docker Desktop installed on your machine. Follow these steps based on your operating system:

1. Windows Installation

Visit the Docker website and download the Docker Desktop installer for Windows. Run the installer, following the on-screen instructions. Upon installation, Docker Desktop may prompt you to enable virtualization in your system's BIOS settings. Make sure to do this for optimal performance.

2. MacOS Installation

Download the Docker Desktop installer for macOS from the official Docker website. Open the downloaded package and drag the Docker icon to your Applications folder. Launch Docker Desktop from the Applications folder.

3. Linux Installation

Install Docker Engine on your Linux distribution by following the official documentation. Download the Docker Desktop package for Linux from the Docker website. Install Docker Desktop by executing the provided commands in the terminal.

Getting Started with Docker Desktop

Now that Docker Desktop is installed, let's explore the basic functionalities.

  1. **Access to DockerHub:Upon launching Docker Desktop, you may be prompted to sign in with your Docker ID. If you don't have one, you can create it for free. Logging in allows you to access Docker Hub, a cloud-based registry for Docker images.
  2. **Dashboard: The Dashboard serves as the command center, providing an overview of your running containers, available images, and other essential information. It's the first screen you see upon launching Docker Desktop.
  3. **Containers: In the Containers section, you can manage your running containers. Docker Desktop allows you to start, stop, and remove containers with a simple click, making it a user-friendly way to interact with your applications.
  4. ****Images:**The Images section displays the Docker images available on your system. You can pull images from Docker Hub, create custom images, and manage image repositories effortlessly.
  5. **Docker Volumes:Volumes in Docker Desktop are where you manage persistent data storage for your containers. This is crucial for applications that require data persistence beyond the lifespan of a container.

Docker Desktop GUI

How to Deploy your First Docker Container with Docker Desktop?

Now that Docker Desktop is up and running, let's deploy a basic containerized application using the GUI. For starters, if you want to explore more.

Deploying the Containerized Image

Creating a Dockerfile

Use the official Nginx image

FROM nginx:latest

Copy your HTML files into the container

COPY ./html /usr/share/nginx/html

Building and Running the Docker Image

docker build -t my-nginx-app .

Building and Running a Docker Image

docker run -d -p 8080:80 my-nginx-app

Running the Docker Container

Managing Multi-Container Applications with Docker Compose

Docker Desktop seamlessly integrates with Docker Compose, allowing you to define and manage multi-container applications using a YAML file. The following are the steps that guides you on how to manage the multi-container applications with docker compose:

Step 1: Create a docker-compose.yml File

version: '3'
services:
web:
image: nginx
ports:
- "8080:80"
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: mydatabase

Docker Compose file

Step 2: Run Docker Compose

Running Docker Compose file

Step 3: Access Your Multi-Container Application

http://localhost:8080

Difference between Docker and Docker Compose

The following are the difference between Docker and Docker Compose:

Feature Docker Docker Compose
**Purpose It is used for managing individual containers. It is used for managing multi-container applications.
**Command-line Tool It uses docker command for performing operations. Uses docker-compose command for performing tasks.
**Configuration Container configurations defined in Dockerfiles. Configurations defined in docker-compose.yml files.
**Orchestration It mainly focuses on single container operations. it facilitaes with simplifying the orchestration of multiple interconnected containers.

Troubleshooting Queries of Docker Container Deployment

The following are the troubleshooting queries of Docker Container Deployment:

1. How To Resolve "Docker Desktop fails to start" Issue?

2. What Are Steps Should Be Taken When Encountered a Failure In Pulling An Image?

3. What To Do When the Port Conflict Issue Raised With Error "Port Already In Use"?

netstat -tnlp

4. What Steps Should Be Taken When The Docker Application Is Not Accessible From The Host?

5. How To TroubleShoot Slow Performance Inside a Docker Container?

Advantages Docker Desktop

The following are the advantages of Docker Desktop:

Disadvantages of Docker Desktop

The following are the disadvantages of Docker Desktop:

Best Practices for maintaining and Securing Docker Containerized Applications

The following are the best practices for maintaining and security docker containerized applications:

Conclusion

Docker Desktop, with its user-friendly interface, brings the power of containerization to developers without the need for extensive command-line knowledge. This guide has covered the installation of Docker Desktop on Windows, macOS, and Linux, as well as an exploration of its graphical interface for deploying and managing containerized applications. By leveraging Docker Desktop's intuitive features, developers can streamline their workflows and embrace the efficiency and portability that containerization offers in the world of modern software development.