Building Docker

kinakokinako
1 min read

Environment

  • Windows 11 Pro

Steps

  1. Enable Hyper-V from “Windows Features.”

  2. Restart your computer.

  3. Run the following command in PowerShell:

     systeminfo | findstr /I "Hyper-V"
    

    If the output looks like this, Hyper-V is enabled and working properly:

     PS C:\WINDOWS\system32>
     Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -like "Hyper-V" }
    
     FeatureName : Microsoft-Hyper-V-All           State : Enabled  
     FeatureName : Microsoft-Hyper-V               State : Enabled  
     FeatureName : Microsoft-Hyper-V-Tools-All     State : Enabled  
     FeatureName : Microsoft-Hyper-V-Management-PowerShell  State : Enabled  
     FeatureName : Microsoft-Hyper-V-Hypervisor    State : Enabled  
     FeatureName : Microsoft-Hyper-V-Services      State : Enabled  
     FeatureName : Microsoft-Hyper-V-Management-Clients  State : Enabled
    
  4. Download Docker Desktop from the following link:
    Docker Desktop

    Choose the appropriate version for your system.

  5. Install Docker with the default settings.

    • By default, WSL2 is enabled.

    • While writing this article, I thought that If I had used WSL2, I wouldn’t have needed to enable Hyper-V.WSL2 might be a better option than Hyper-V.

  6. Run the following command in PowerShell:

     docker run hello-world
    

    If everything is set up correctly, you should see:

     Hello from Docker!  
     This message shows that your installation appears to be working correctly.
    

Done. Easy.

0
Subscribe to my newsletter

Read articles from kinako directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

kinako
kinako