Microsoft chạy docker trên windows 10

Estimated reading time: 9 minutes

Docker Desktop terms

Commercial use of Docker Desktop in larger enterprises (more than 250 employees OR more than $10 million USD in annual revenue) requires a paid subscription.

Welcome to Docker Desktop for Windows. This page contains information about Docker Desktop for Windows system requirements, download URL, instructions to install and update Docker Desktop for Windows.

Download Docker Desktop for Windows

Docker Desktop for Windows

For checksums, see Release notes

System requirements

Your Windows machine must meet the following requirements to successfully install Docker Desktop.

  • WSL 2 backend
  • Hyper-V backend and Windows containers

WSL 2 backend

  • Windows 11 64-bit: Home or Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
  • Windows 10 64-bit: Home or Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher.
  • Enable the WSL 2 feature on Windows. For detailed instructions, refer to the Microsoft documentation.
  • The following hardware prerequisites are required to successfully run WSL 2 on Windows 10 or Windows 11:

    • 64-bit processor with Second Level Address Translation (SLAT)
    • 4GB system RAM
    • BIOS-level hardware virtualization support must be enabled in the BIOS settings. For more information, see Virtualization.
  • Download and install the Linux kernel update package.

Hyper-V backend and Windows containers

  • Windows 11 64-bit: Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
  • Windows 10 64-bit: Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher.

    For Windows 10 and Windows 11 Home, see the system requirements in the WSL 2 backend tab.

  • Hyper-V and Containers Windows features must be enabled.
  • The following hardware prerequisites are required to successfully run Client Hyper-V on Windows 10:

    • 64 bit processor with Second Level Address Translation (SLAT)
    • 4GB system RAM
    • BIOS-level hardware virtualization support must be enabled in the BIOS settings. For more information, see Virtualization.

Note

Docker only supports Docker Desktop on Windows for those versions of Windows 10 that are still within Microsoft’s servicing timeline.

Containers and images created with Docker Desktop are shared between all user accounts on machines where it is installed. This is because all Windows accounts use the same VM to build and run containers. Note that it is not possible to share containers and images between user accounts when using the Docker Desktop WSL 2 backend.

Running Docker Desktop inside a VMware ESXi or Azure VM is supported for Docker Business customers. It requires enabling nested virtualization on the hypervisor first. For more information, see Running Docker Desktop in a VM or VDI environment.

About Windows containers

Looking for information on using Windows containers?

  • Switch between Windows and Linux containers describes how you can toggle between Linux and Windows containers in Docker Desktop and points you to the tutorial mentioned above.
  • Getting Started with Windows Containers (Lab) provides a tutorial on how to set up and run Windows containers on Windows 10, Windows Server 2016 and Windows Server 2019. It shows you how to use a MusicStore application with Windows containers.
  • Docker Container Platform for Windows articles and blog posts on the Docker website.

Note

To run Windows containers, you need Windows 10 or Windows 11 Professional or Enterprise edition. Windows Home or Education editions will only allow you to run Linux containers.

Install Docker Desktop on Windows

Install interactively

  1. Double-click Docker Desktop Installer.exe to run the installer.

    If you haven’t already downloaded the installer (Docker Desktop Installer.exe), you can get it from Docker Hub. It typically downloads to your Downloads folder, or you can run it from the recent downloads bar at the bottom of your web browser.

  2. When prompted, ensure the Use WSL 2 instead of Hyper-V option on the Configuration page is selected or not depending on your choice of backend.

    If your system only supports one of the two options, you will not be able to select which backend to use.

  3. Follow the instructions on the installation wizard to authorize the installer and proceed with the install.

  4. When the installation is successful, click Close to complete the installation process.

  5. If your admin account is different to your user account, you must add the user to the docker-users group. Run Computer Management as an administrator and navigate to Local Users and Groups > Groups > docker-users. Right-click to add the user to the group. Log out and log back in for the changes to take effect.

Install from the command line

After downloading Docker Desktop Installer.exe, run the following command in a terminal to install Docker Desktop:

"Docker Desktop Installer.exe" install

If you’re using PowerShell you should run it as:

Start-Process 'Docker Desktop Installer.exe' -Wait install

If using the Windows Command Prompt:

start /w "" "Docker Desktop Installer.exe" install

The install command accepts the following flags:

  • --quiet: suppresses information output when running the installer
  • --accept-license: accepts the Docker Subscription Service Agreement now, rather than requiring it to be accepted when the application is first run
  • --no-windows-containers: disables Windows containers integration
  • --allowed-org=: requires the user to sign in and be part of the specified Docker Hub organization when running the application
  • --backend=: selects the default backend to use for Docker Desktop, hyper-v, windows or wsl-2 (default)

If your admin account is different to your user account, you must add the user to the docker-users group:

net localgroup docker-users  /add

Start Docker Desktop

Docker Desktop does not start automatically after installation. To start Docker Desktop:

  1. Search for Docker, and select Docker Desktop in the search results.

    Microsoft chạy docker trên windows 10

  2. The Docker menu () displays the Docker Subscription Service Agreement window.

    Here’s a summary of the key points:

    • Docker Desktop is free for small businesses (fewer than 250 employees AND less than $10 million in annual revenue), personal use, education, and non-commercial open source projects.
    • Otherwise, it requires a paid subscription for professional use.
    • Paid subscriptions are also required for government entities.
    • The Docker Pro, Team, and Business subscriptions include commercial use of Docker Desktop.
  3. Select Accept to continue. Docker Desktop starts after you accept the terms.

    Important

    If you do not agree to the terms, the Docker Desktop application will close and you can no longer run Docker Desktop on your machine. You can choose to accept the terms at a later date by opening Docker Desktop.

    For more information, see Docker Desktop Subscription Service Agreement. We recommend that you also read the FAQs.

Updates

When an update is available, Docker Desktop displays an icon on the Docker menu to indicate the availability of a newer version. Additionally, the Software Updates section in Settings (Preferences on Mac) also notifies you of any updates available to Docker Desktop. You can choose to download the update right away, or click the Release Notes option to learn what’s included in the updated version.

Starting with Docker Desktop 4.2.0, the option to turn off the automatic check for updates is available for users on all Docker subscriptions, including Docker Personal and Docker Pro..

Click Download update When you are ready to download the update. This downloads the update in the background. After downloading the update, click Update and restart from the Docker menu. This installs the latest update and restarts Docker Desktop for the changes to take effect.

When Docker Desktop starts, it displays the Docker Subscription Service Agreement window. Read the information presented on the screen to understand how the changes impact you. Click the checkbox to indicate that you accept the terms and then click Accept to continue.

Important

If you do not agree to the terms, the Docker Desktop application will close and you can no longer run Docker Desktop on your machine. You can choose to accept the terms at a later date by opening Docker Desktop.

Docker Desktop starts after you accept the terms.

Uninstall Docker Desktop

To uninstall Docker Desktop from your Windows machine:

  1. From the Windows Start menu, select Settings > Apps > Apps & features.
  2. Select Docker Desktop from the Apps & features list and then select Uninstall.
  3. Click Uninstall to confirm your selection.

Important

Uninstalling Docker Desktop destroys Docker containers, images, volumes, and other Docker related data local to the machine, and removes the files generated by the application. Refer to the back up and restore data section to learn how to preserve important data before uninstalling.

Where to go next

  • Get started with Docker is a tutorial that teaches you how to deploy a multi-service stack.
  • Troubleshooting describes common problems, workarounds, and how to get support.
  • FAQs provide answers to frequently asked questions.
  • Release notes lists component updates, new features, and improvements associated with Docker Desktop releases.
  • Back up and restore data provides instructions on backing up and restoring data related to Docker.
windows, install, download, run, docker, local