---
title: "Docker on Windows? Get Started Learning Now Or...!"
description: "Learn how to set up, configure and deploy a Docker container with Docker on Windows in this step-by-step tutorial!"
canonical: "https://adamtheautomator.com/docker-windows/"
---

# Docker on Windows? Get Started Learning Now Or...!

> Learn how to set up, configure and deploy a Docker container with Docker on Windows in this step-by-step tutorial!

Source: https://adamtheautomator.com/docker-windows/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Docker on Windows? Get Started Learning Now Or…!](https://adamtheautomator.com/wp-content/uploads/2019/11/container-1611490_1920.jpg)

# Docker on Windows? Get Started Learning Now Or…!

[![](https://secure.gravatar.com/avatar/27e51fdfdee0acb33447a19c501780e43dec078b24bd8d9d9c10fd1c11a6b21c?s=192&d=mm&r=g)Devin Rich](https://adamtheautomator.com/author/devin/)20 November 20198 min. read

Categories: [DevOps](/category/devops/)

Tags:[Docker](/tag/docker/)

Table of Contents

*   [Prerequisites for Docker on Windows](#prerequisites-requirements)
*   [Downloading and Installing Docker Desktop](#downloading-and-installing-docker-desktop)
*   [From Docker.com](#from-docker-com)
*   [Using Chocolatey](#using-chocolatey)
*   [Validating the Docker Desktop Installation](#validating-the-docker-desktop-installation)
*   [Running Commands in Docker Containers](#running-commands-in-docker-containers)
*   [Accessing Files from the Docker Host in Containers](#accessing-files-from-the-docker-host-in-containers)
*   [Mapping Network Ports](#mapping-network-ports)
*   [Publishing Network Ports](#publishing-network-ports)
*   [Changing the Published Ports](#changing-the-published-ports)
*   [Stopping all Containers](#stopping-all-containers)
*   [Cleaning Up](#cleaning-up)

If you’re new to containers and Docker and work primarily on Windows, you’re in for a treat. In this article, you’re going to learn how to set up Docker on Windows 10 using [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/) or simply referred to as _Docker Desktop_ in this article.

Not a reader? Watch this related video tutorial!

**_Not seeing the video? Make sure your ad blocker is disabled._**

Docker Desktop is the Docker Engine and a management client packaged together for easy use in Windows 10. In this article, you will install Docker Desktop, deploy your first container, and share data between your host and your containers.

Related:[Creating Your First Docker Windows Server Container](https://adamtheautomator.com/docker-windows-server/)

## Prerequisites for Docker on Windows

This is a walkthrough article demonstrating various steps in Docker Desktop for Docker on Windows. To follow along, be sure you have a few specific requirements in place first.

*   An Internet connection to download 800MB+ of data
*   Windows 10 64-bit running Pro, Enterprise, or Education edition with release 1703 or newer. This is necessary to run Hyper-V on Windows 10.
*   A CPU with [SLAT](https://en.wikipedia.org/wiki/Second_Level_Address_Translation) (nested paging) compatibility. All AMD/Intel processors since approximately 2008 are SLAT compatible
*   At least 4GB of RAM
*   BIOS hardware virtualization sometimes labeled as _Virtualization Technology_ or _VTx_. This must be enabled and show as _Enabled_ in the performance tab of Task Manager as shown below.

![Enabled BIOS virtualization shown in Windows Task Manager](https://adamtheautomator.com/wp-content/uploads/2020/06/Manager-as-shown-below.png)

Enabled BIOS virtualization shown in Windows Task Manager

## Downloading and Installing Docker Desktop

Up first, you need to download and [install Docker](https://adamtheautomator.com/docker-ubuntu/ "install Docker") Desktop to get Docker on Windows going. Docker Desktop comes available in two releases; a stable release and a testing release.

The stable release is released quarterly and ensures a fully-tested application. In this article, you will be using the stable release.

> _Warning: Upon installation, Docker Desktop will prompt you to install the Hyper-V hypervisor if not already installed. By doing so, the Hyper-V hypervisor prevents any user-mode hypervisors such as VirtualBox, VMWare, etc. from running guest VMs. Hyper-V support for [VirtualBox](https://forums.virtualbox.org/viewtopic.php?t=90853) and [VMWare](https://blogs.vmware.com/workstation/2019/08/workstation-hyper-v-harmony.html) is limited but coming._

You also have the option of a download source through manually downloading Docker Desktop directly from [Docker.com](https://www.docker.com/) or via the Windows package manager, [Chocolatey](https://chocolatey.org/how-chocolatey-works). Let’s briefly cover each method.

### From [Docker.com](https://www.docker.com/)

To download Docker Desktop directly from [docker.com](https://www.docker.com/), you can go to the [product page](https://www.docker.com/products/docker-desktop/), register for an account and download it from there. This is preferred if you intend to use Docker in production by registering an account.

However, if you’re just testing Docker out for the first time, you can also download it directly which is much easier.

Once the EXE is downloaded, run the executable and click through the prompts accepting all of the defaults.

When asked whether you plan to _Use Windows containers instead of Linux containers_, as shown below, do _not_ enable the checkbox. You will be using Linux containers in this article.

![Installing Docker Desktop](https://adamtheautomator.com/wp-content/uploads/2020/06/Linux-containers-in-this-article..png)

Installing Docker Desktop

Once installation is complete, reboot your computer.

> _Selecting the option to use Windows containers or Linux containers tells Docker to attach images to a Windows kernel or Linux kernel. You can change this setting at any time after installation by right-clicking the Docker icon in the System Tray and selecting Switch to Windows containers as shown below._

![Switching to Windows containers](https://adamtheautomator.com/wp-content/uploads/2020/06/containers-as-shown-below..png)

Switching to Windows containers

### Using Chocolatey

The other option to get Docker Desktop downloaded and installed is with [Chocolatey](https://adamtheautomator.com/install-chocolatey/ "Chocolatey"). Chocolatey automates many of the download/install tasks for you. To do so, open up a command-line console (either cmd or PowerShell) as an administrator to download and install the program in one shot by running the command below.

```bash
choco install docker-desktop
```

Once complete, reboot Windows 10.

> _If you’d like to try out the testing release at some point, you can download and install this by running `choco install docker-desktop --pre`._

## Validating the Docker Desktop Installation

Once installed, Docker Desktop automatically runs as a service providing Docker on Windows. It’s shown in the system tray when you log in to Windows after you reboot. But how do you actually know it’s working?

To validate Docker Desktop is working correctly, open a command-line console and run the `docker` command. If the installation went well, you will see a Docker command reference.

Finally, have Docker download and run an example container image called _hello-world_ by running the command `docker run hello-world`. If all is well, you will see output like below.

![A successful test image run via Docker Desktop](https://adamtheautomator.com/wp-content/uploads/2020/06/will-see-output-like-below..png)

A successful test image run via Docker Desktop

## Running Commands in Docker Containers

Docker Desktop is installed and you’ve verified all is well? Now what? To get started with Docker on Windows, one common task to perform in a Docker container is running commands. Through the `docker run` command, you can send commands through the host (your Windows 10 PC) directly into a running container.

To run commands in a container with `docker run`, you’ll first specify an image name followed by the command. To get started, tell Docker to run the command `hostname` inside of a container called _alpine_ as seen below.

```bash
> docker run alpine hostname
b74ff46601af
```

Related: [How To Create A Docker Windows Image With Docker Build Tag](https://adamtheautomator.com/docker-build-tag/)

Since you don’t have the _alpine_ Docker image on your computer now, Docker on Windows will download the tiny image from the Docker Hub, bring up a container from that image, and send the command directly into the container and shut it down all in one swoop.

If you’d like to keep the container running, you can also use the `-it` parameter. This parameter tells Docker to keep the container in “interactive mode” leaving it running in the foreground after executing the command. You’ll see that you are then presented with a terminal prompt ready to go.

```bash
> docker run -it alpine sh
/ #
```

When you’re done in the terminal, type `exit` to return to Windows 10.

## Accessing Files from the Docker Host in Containers

Another common task is accessing host files from containers. To access host files in containers, Docker on Windows allows you to link a folder path from your desktop to share that folder to your container. This process is called _binding_.

Related:[How to Manage Docker Volumes on Windows](https://adamtheautomator.com/create-docker-volume/)

To create a binding, make a folder on a local drive. For this example, I’ll use _E:\\_ and call it _input._ It’ll then create a new text document named _file.txt_ in the folder. Feel free to use whatever path and file you wish.

Once you have the folder you’d like to share between the host and container, Docker needs to mount the folder using the `--mount` parameter. The `--mount` parameter requires three arguments; a mount type, a source host directory path and a target directory path. The target path will be a symbolic link within the container.

Below you will see an example of mounting the entire _E:\\_ within the Windows 10 host to show up as the _/home/TEST_ directory inside of the Linux container.

```bash
> docker run --mount type=bind,source="E:/",target=/home/TEST -it alpine
```

When you attempt to mount a host folder, Docker Desktop will ask for your permission to share this drive with the Docker containers as seen below.

![Sharing a Docker drive](https://adamtheautomator.com/wp-content/uploads/2020/06/Docker-containers-as-seen-below..png)

Sharing a Docker drive

If you created the _file.txt_ file in the Windows 10 folder as described earlier, run `cat /home/TEST/input/file.txt`. You will see that contents are displayed.

Now, delete the _input_ folder that you just created and run the `cat ...` command again. Observe that the shell now reports that the file does not exist anymore.

![Working with files in Docker containers](https://adamtheautomator.com/wp-content/uploads/2020/06/file-does-not-exist-anymore..png)

Working with files in Docker containers

## Mapping Network Ports

Another important concept to know is how Docker on Windows handles networking. For a brief introduction, let’s see what it takes to access a web service running in a container from the local host.

First, spin up a demo image that will run an example webpage. Download and run the Docker image called _dockersamples/static-site_. You’ll use `docker container run` to do so.

The following command does four actions at once:

*   Downloads a Docker image from Docker Hub called _static-site_ in the _docker-samples_ “directory”
*   Starts a container instance up from the _static-site_ image
*   Immediately detaches the container from the terminal foreground (`—detach`)
*   Makes the running container’s network ports accessible to the Windows 10 host (`—publish-all`)

```bash
docker container run --detach --publish-all dockersamples/static-site
## Alternate/shorthand syntax that does the same thing:
## docker container run -d -P dockersamples/static-site
## docker run -d -P dockersamples/static-site
```

Once run, Docker will return the container ID that was brought up as shown below.

![Docker container ID returned from running a container](https://adamtheautomator.com/wp-content/uploads/2020/06/up-as-shown-below..png)

Docker container ID returned from running a container

### Publishing Network Ports

Since using the `--publish-all` parameter, local host ports are now mapped to the container’s network stack. You can use the `docker ps` subcommand to list all running containers including what ports are assigned to all of the running containers. In the instance below, one container is running mapping host port 32777 to container port 80 and host port 32776 to container port 443.

![Showing port mapping of Docker container](https://adamtheautomator.com/wp-content/uploads/2020/06/ontainer-port-443..png)

Showing port mapping of Docker container

Docker on Windows assigns containers random ports when using the `--publish-all` parameter unless explicitly define them.

Now open up a web browser and navigate to http://localhost:32777 or the port that Docker assigned to map to port 80 as output by `docker ps`. If all goes well, you should see the below webpage show up.

![Resulting webpage running in the Docker container](https://adamtheautomator.com/wp-content/uploads/2020/06/webpage-show-up..png)

Resulting webpage running in the Docker container

### Changing the Published Ports

You now have a Docker container running in Docker on Windows serving up a simple web page. Congratulations! But now you need to specify a specific port binding not relying on the random port selection with `--publish-all`. No problem. Use the `-p` parameter.

First, stop the running container by specifying a unique string of it’s container ID. You can find this container ID by running `docker ps`. Once you know the container ID, stop the container and start a new one while designating Docker to assign a specific port to publish.

The [syntax for specifying a port](https://docs.docker.com/config/containers/container-networking/#published-ports) is `<external port>:<container port>`. For each port that you want to publish, use the `--publish` or `-p` switch with the external and container port numbers as shown below.

```bash
> docker stop f766
> docker run --detach -p 1337:80 dockersamples/static-site
```

> _When you are specifying a container ID, you only have to type enough of the ID to be unique. If you are only running a single container and its ID is `f766f4ac8d66bf7`, you can identify the container using any number of characters including just `f`. The requirement is that whatever you type allows it to uniquely identify a single container._

Now go to your web browser and navigate to `localhost:1337`. Remember, you are not changing the image and it always listens on port 80; you are changing the port translation rule in the Docker configuration that lets you connect to the container.

![Webpage being served up on port 1337](https://adamtheautomator.com/wp-content/uploads/2020/06/to-the-container..png)

Webpage being served up on port 1337

## Stopping all Containers

Using `docker stop`, you can stop a container but how do you stop multiple containers at once? One way to do so is by providing multiple, space-delimited container IDs. You can see below an example of how to stop three containers with IDs of `fd50b0a446e7`, `36ee57c3b7da`, and `7c45664906ff.`

Related:[Use Docker Stop Containers Without Screwing Things Up!](https://adamtheautomator.com/docker-stop-containers/)

```bash
> docker stop fd50 36ee 7c45
```

> _If you’re [managing Docker containers in PowerShell](https://adamtheautomator.com/powershell-scheduled-task/), you can also use a shortcut to stop all containers. Feed a list of container IDs via `docker ps -q` to the stop parameter through PowerShell’s command expansion_ `docker stop (docker ps -q)`.

Confirm all containers are stopped by seeing no containers listed when you type `docker ps`.

## Cleaning Up

You’ve downloaded a few container images and run some containers that are now stopped. Even though they’re stopped, their allocated storage isn’t gone off of the local host disk. You must delete the containers free up that space and avoid cluttering up your workspace.

To delete a single container, use the container remove `rm` parameter like below.

```bash
> docker container rm <container ID>
```

Or, to delete all stopped containers, use the `prune` parameter as below.

```bash
> docker container prune
```

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fdocker-windows%2F&text=Docker%20on%20Windows%3F%20Get%20Started%20Learning%20Now%20Or%E2%80%A6!)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fdocker-windows%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fdocker-windows%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2026/02/featured_image-13.webp)

### [Azure Container Apps: Instant Preview Environments per PR](/build-ephemeral-preview-environments-every-pr/)

Build isolated preview environments for every pull request using Azure Container Apps revision labels and Azure DevOps pipelines with scale-to-zero economics.

![](https://adamtheautomator.com/wp-content/uploads/2025/11/55418e927e511ae263219c072e27d637c2a967a5036de7020b329582db775c26.png)

### [Automating Docker Container Health Checks with Python and Local Notifications](/docker-health-checks-python/)

Docker's built-in health checks are passive—they tell Docker when a container fails, but do they tell you? In this tutorial, we'll build a lightweight Python monitoring system that runs entirely on your infrastructure with zero external dependencies. You'll learn to detect container failures in real-time, send instant alerts, and maintain a complete audit log of every state change.

![](https://adamtheautomator.com/wp-content/uploads/2023/07/gitea-docker.jpg)

### [Gitea Docker: Your Ultimate Self-Hosted Git Solution](/gitea-docker/)

Learn how to install a Gitea Docker instance and self-host Git repositories securely in this ATA Learning tutorial!

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
