DEV Community

Damith
Damith

Posted on

Docker Desktop Container crash with exit code 139 on Windows WSL Fix

Alt Text

Issue : Docker Container exits on Docker desktop (Windows) with exit code 139.

This is a known problem when running Docker desktop with WSL based engine on windows.

The culprit is the base OS of your docker image.

The Fix is pretty simple.

To fix this, You have to Enable vsyscall=emulate in the kernel config to run older base images.

Step 1 : Create a file named .wslconfig in your user directory
Ex:- C://users/[your user name]/.wslconfig

Step 2 : Add following line to the .wslconfig file

[wsl2]
kernelCommandLine = vsyscall=emulate
Enter fullscreen mode Exit fullscreen mode

Step 3 : Restart Your PC and the issue will be fixed ;)

Top comments (3)

Collapse
 
cheongroach profile image
Cheongroach

Cool! My problem is solved!

Collapse
 
kalastrof profile image
kalastrof

Thanks a lot, that solved issues with Kubernetes on kind

Collapse
 
ncdejito profile image
Niccolo Dejito

Thanks so much! This fixed my problem of hanging deployments when I was working on Kind K8s emulator which uses docker inside.