WSL Docker Elasticsearchで max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

PowerShellで以下を実行して解決

❯ wsl --shutdown # because we don't really need to restart the computer to see the config is lost ...
⚡ beccari@RAYGUN  ~                                                                                         [00:28]
❯ wsl -d docker-desktop cat /proc/sys/vm/max_map_count # current value
65530
⚡ beccari@RAYGUN  ~                                                                                         [00:28]
❯ wsl -d docker-desktop sysctl -w vm.max_map_count=262144
vm.max_map_count = 262144
⚡ beccari@RAYGUN  ~                                                                                         [00:28]
❯ wsl -d docker-desktop cat /proc/sys/vm/max_map_count 
262144
⚡ beccari@RAYGUN  ~                                                                                         [00:28]
❯

github.com