Skip to content

Latest commit

 

History

History
115 lines (72 loc) · 2.53 KB

Install Docker for Windows.md

File metadata and controls

115 lines (72 loc) · 2.53 KB
created modified
2024-12-09 17:48:54 UTC
2024-12-09 17:48:54 UTC

Install Docker for Windows

Reference

Install Docker Desktop on Windows

Install Windows Subsystem for Linux (WSL)

Reference

Windows Subsystem for Linux Installation Guide for Windows 10

cls

# Enable Windows Subsystem for Linux

dism.exe /online /enable-feature `
    /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
cls

# Enable Virtual Machine feature

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all `
    /norestart

Download and install Linux kernel update package

WSL2 Linux kernel update package for x64 machines

cls

# Set WSL 2 as default version

wsl --set-default-version 2

Install Linux distribution of choice

Ubuntu 20.04 LTS

Install Docker Desktop

Docker Desktop for Windows

Install additional Visual Studio Code extensions for Docker development

Install extension: Docker

ext install ms-azuretools.vscode-docker

Install extension: Kubernetes

ext install ms-kubernetes-tools.vscode-kubernetes-tools

Install extension: Remote - Containers

ext install ms-vscode-remote.remote-containers

Install extension: Remote - WSL

ext install ms-vscode-remote.remote-wsl

Issue: Docker images consume large amount of disk space

(screenshot)

Move Docker images from C: drive (SSD) to F: drive (HDD)

Quit Docker Desktop

# Move Docker Desktop storage (VHDX) used for images

wsl --shutdown

wsl --export docker-desktop-data docker-desktop-data.tar

wsl --unregister docker-desktop-data

mkdir E:\NotBackedUp\jjameson\docker-desktop-data

wsl --import docker-desktop-data E:\NotBackedUp\jjameson\docker-desktop-data `
    .\docker-desktop-data.tar --version 2

References

How to move ext4.vhdx to a non system disk?

how to move the vhdx of wsl2 to other disk