Building a Docker Environment Completely Offline on Windows 10
Deployed System Environment
OS: Windows 10 (19045.2364, KB5021233 up)
Internet: Fully Offline (Can only be built through package installation.)
Docker: Docker Desktop 4.27.2(137060)
WSL: 2.1.4 up (Manual installation)
To Using Windows Docker:
- No need to install Ubuntu (unnecessary).
- No need to use Hyper-V (deprecated in the new version).
- Using Linux Containers on Windows.
Step 1: Verify Windows Features in Control Panel
Docker has integrated WSL 2, so Hyper-V is no longer required. lol~
Enable “Virtual Machine Platform” and “Windows Subsystem for Linux” in Docker’s New Version.
After enabling, please proceed with a direct reboot.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Windows PowerShell
1.
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
2.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
3. Check enabled features
- Virtual Machine Platform
- Windows Hypervisor platform
- Windows Subsystem for Linux
4.
Reboot PC
Step 2: Package installation preparation
Download and install WSL 2 from Github Microsoft WSL
Download and install Docker Desktop
When installing, just check all options
After installation is complete, please don’t open it!
Step 3: Setting WSL version to 2
1
2
3
4
# CMD
wsl -v
wsl --set-default-version 2
Step 4: Restart your PC
Step 5: Start Docker
Docker is running now!
Though WSL, some missing elements are visible, but they do not affect usage.
Notice!!
If you have already installed and encountered a failure, please follow the steps below to remove the occupied files.
- To remove Docker using Add or Remove Programs, Check C:\Program Files\Docker Remove
- Delete C:\Users\user\AppData\Local\Docker
- Delete C:\Users\user\AppData\Roaming\Docker
- Reboot PC