Getting Started with Docker Desktop

If you’re curious about Docker but haven’t used it, you’re at the right place. While Docker is technical at its core, our goal is to make our tools approachable for all users regardless of their familiarity with containers. This blog introduces Docker technology, Docker Desktop, and why you should care about both.

What is Docker?

Before talking about Docker, let’s take a moment to highlight containers. A container packages code and all its dependencies into a single unit, thus letting an application run quickly and reliably from one computing environment to another. This makes such applications easily portable between machines and solves the “it works on my machine” problem. Though the technology behind containers has been around for a while, Docker made it easier to work with containers. Since its debut in 2013, Docker has become an industry standard. Currently, the core technology exists as a popular, open-source container runtime called Docker Engine.  

To create Docker containers, you’ll first need a Docker image. If you’re familiar with object-oriented programming concepts, think of images as classes and containers as objects.    Images include everything needed to run an application: code, runtime, system tools, system libraries, and settings. 

What can I use Docker for?  

Docker simplifies application development and removes complexities for you and many other developers around the world. This allows you to be more productive and devote more time to your actual development process. You can deploy both simple and complex applications more easily. Docker is ideal for the following use cases, and many more:

  • Software prototyping and packaging 
  • Microservice architecture implementation  
  • Network modeling
  • Continuous integration and delivery
  • Reducing debugging overhead
  • Running more workloads on the same hardware

What is Docker Desktop? 

One of the best ways to get started with Docker is by installing Docker Desktopespecially if you’re a developer using Mac or Windows. That said, you might be wondering, “What’s Docker Desktop, and how’s it different from the open-source Docker Engine?”  

While some developers envision Docker Desktop as just a GUI on top of Docker Engine, that characterization barely scratches the surface. Docker Desktop is an easy-to-install application and includes Docker Engine, Docker CLI client, Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. Docker Desktop still uses Docker Engine at its core. However, the seamless integration and interoperability of these tools makes Docker Desktop user-friendly—regardless of your experience with Docker. 

By installing and using Docker Desktop, you’ll enjoy the following features: 

  • Simple and easy-to-install environment to build, ship, and run your containers
  • Easy way to create and manage using volumes
  • Local and remote management of Docker images
  • Better collaboration by sharing repeatable and reproducible development from your local machine to the container
  • Simple, one-click Kubernetes setup for your local machine
  • A dashboard for a quick overview of running containers, images, and volumes
  • Support for building and using multi-architecture images

Docker Desktop adds these additional features atop existing open-source tooling, allowing you to easily maintain, monitor, and update Docker tooling. It also provides you with a consistent experience across different OSes. Docker Desktop makes collaboration easy using Docker Dev Environments, allowing teams to share their work with one click via Git or Docker Hub. It also has an easy-to-use UI for many common actions:

  • Starting a container 
  • Pausing and resuming a container 
  • Stopping a container
  • Setting up a single-node local Kubernetes cluster
  • Creating or deleting volumes 

Additionally, both the GUI and CLI are always available to you based on your preferences. 

How do I get started? 

Check out our official documentation to learn more about best practices. The documentation has helpful quickstart resources and language-specific guides. The Docker Desktop documentation also provides an overview of key features with usage instructions. 

Additionally, Docker users can learn, connect, and collaborate with each other via our Docker Community Slack channel. You can chat with Docker community leaders, Docker Captains, and your fellow local developers in the channel. You’ll also get up-to-date information about Docker-related events, conferences around the world, and Docker community all-hands events. Docker is also the most-loved tool according to Stack Overflow’s 2021 Developer Survey. Other users are always willing to lend a helping hand. 

Hoping to learn at your own pace? A list of comprehensive hosted labs, self-guided tutorials, books, and self-guided online courses are summarized in the documentation under the education resources section.

Exploring Docker Desktop with a quick example

If you’ve installed Docker Desktop and want to explore more, here’s a quick example to get you started:

  1. Open Docker Desktop. 
  2. Type the following command in your terminal:
    docker run -d -p 80:80 docker/getting-started
  3. Open your browser to http://localhost
  4. Follow the instructions for either Mac or Windows to access your dashboard

You should see something like the screenshot below, where a container called objective_merkle is visibly running. Container names are randomly generated—with the first word being an adjective, and the last name referencing either a notable scientist or hacker (more information in this GitHub repo).

Container apps dd

If you look at the command, there are a few flags after the command “docker run” to get the container running. A simple explanation for them is:

  • -d runs the application in the background
  • -p 80:80 provides the mapping from the host port to the container port. You can learn more about port mapping here
  • docker/getting-started is the container image being used

Once you type the command, Docker recognizes the flags, executes the command, and looks for the image locally. If you don’t have an image by this name on your system, Docker will automatically find and retrieve it from Docker Hub. If you’re new to Docker, just think that Docker Hub is to Docker what GitHub is to Git.

The image that you pulled is on Docker Hub. Another way to pull this using the following command on your terminal 

docker pull docker/getting-started

The image is a simple to-do list manager running on Node.Js. This tutorial does not require any JavaScript experience. Detailed information can be found on the tutorial page or by clicking on http://localhost after running the container. This tutorial dives much deeper into various aspects of Docker and Docker Desktop than this blog. 

One More Thing

This blog centers primarily on Docker Desktop for Mac and Windows, but we’re thrilled to announce that Docker Desktop for Linux is coming soon. Docker Desktop for Linux (DD4L) is the second-most popular feature request in our public roadmap. If you want to become an early adopter, check out our guide for installing the Docker Desktop for Linux Tech Preview. You can play a key role in helping improve Docker Desktop for Linux prior to launch. 

Check out the hands-on demo of Docker Desktop for Linux at our Community All Hands event on March 31, 2022. You’re also invited to join other developers—and boost your development skills—at DockerCon 2022. Pre-event training kicks off on May 9th, while our virtual event begins on May 10th. See you there!


0 thoughts on "Getting Started with Docker Desktop"