apps:docker:dockerdesktopforwindows
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apps:docker:dockerdesktopforwindows [2024-06-06 18:50] – Manuel Frei | apps:docker:dockerdesktopforwindows [2024-06-13 02:48] (current) – Manuel Frei | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Docker Desktop for Windows ====== | ====== Docker Desktop for Windows ====== | ||
- | FIXME FIXME FIXME | + | ===== Purpose / Usage ===== |
+ | |||
+ | Docker Desktop is a UI to help developers working with the Docker engine. <color # | ||
+ | |||
+ | * It only works within an interactive user session | ||
+ | * There are memory usage problems: [[https:// | ||
===== Configuration ===== | ===== Configuration ===== | ||
Line 12: | Line 18: | ||
Default configuration as of Docker Desktop for Windows version 4.30.0 (2024-06-06). | Default configuration as of Docker Desktop for Windows version 4.30.0 (2024-06-06). | ||
- | < | + | < |
{ | { | ||
" | " | ||
Line 24: | Line 30: | ||
</ | </ | ||
- | The default log driver is json-file. All the lines that are written to the stdout/ | + | The default log driver is json-file. All the lines that are written to the stdout/ |
- | <code json daemon.json> | + | |
+ | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Together with the default configuration, | ||
+ | <code JavaScript | ||
{ | { | ||
" | " | ||
Line 46: | Line 64: | ||
< | < | ||
%UserProfile%\.wslconfig | %UserProfile%\.wslconfig | ||
+ | </ | ||
+ | <code ini> | ||
[experimental] | [experimental] | ||
autoMemoryReclaim=gradual | autoMemoryReclaim=gradual | ||
Line 62: | Line 82: | ||
</ | </ | ||
- | ===== Shrinking VHDX ===== | + | ===== WSL2 Backend |
+ | WSL2 is the recommended backend | ||
+ | * " | ||
+ | * " | ||
- | < | ||
- | PS C:\> Get-Item C: | + | ==== List Distributions ==== |
+ | < | ||
+ | wsl -l -v | ||
+ | </ | ||
- | Directory: | + | <code - Example> |
+ | PS C:\> wsl -l -v | ||
+ | NAME | ||
+ | * docker-desktop-data | ||
+ | docker-desktop | ||
+ | </ | ||
+ | < | ||
+ | wsl -d docker-desktop | ||
+ | </ | ||
- | Mode | + | < |
- | ---- ------------- | + | PS C:\> wsl -l -v |
- | -a---- 04/ | + | NAME |
+ | * docker-desktop-data Running | ||
+ | | ||
+ | PS C:\> wsl -d docker-desktop | ||
+ | DESKTOP-4D1F8L4:/# | ||
+ | </ | ||
- | https:// | + | ==== Shrink VHDX ==== |
- | PS C:\> Optimize-VHD -Path c: | + | The virtual disks (VHDX) for the WSL2 VMs will grow to contain all the container data. If they get too big you have to do an offline shrink operation to get them back to a smaller size. |
- | PS C:\> Optimize-VHD -Path c: | + | |
+ | Make sure, the Docker Engine is stopped and close Docker Desktop for Windows. | ||
- | PS C:\> wsl --shutdown | + | Shutdown the WSL2 distributions. |
+ | <code> | ||
+ | wsl --shutdown | ||
+ | </ | ||
- | PS C:\> Optimize-VHD C: | + | Shrink both disks with " |
+ | <code> | ||
+ | Optimize-VHD | ||
+ | Optimize-VHD -Path " | ||
+ | </ | ||
+ | If Optimize-VHD is done, just start Docker Desktop for Windows again. | ||
+ | Example. | ||
+ | < | ||
PS C:\> Get-Item C: | PS C:\> Get-Item C: | ||
- | |||
Directory: C: | Directory: C: | ||
- | |||
Mode | Mode | ||
---- | ---- | ||
- | -a---- | + | -a---- |
+ | PS C:\> wsl --shutdown | ||
+ | PS C:\> Optimize-VHD C: | ||
+ | PS C:\> Get-Item C: | ||
+ | Directory: C: | ||
- | PS C:\> wsl -l -v | + | Mode |
- | NAME | + | ---- |
- | * docker-desktop-data Running | + | -a---- 04/ |
- | | + | </ |
- | PS C:\> wsl -d docker-desktop | + | ===== Links ===== |
- | DESKTOP-4D1F8L4:/# | + | |
+ | * [[https:// | ||
- | |||
- | </ | ||
apps/docker/dockerdesktopforwindows.1717692601.txt.gz · Last modified: 2024-06-06 18:50 by Manuel Frei