Stop Docker Desktop for Windows and move to Docker Engine on WSL2


Due to the fact that docker licensing has changed and you can no longer use docker Desktop in companies, it’s time to migrate from Docker Desktop into Docker Engine on WSL2

Deletion procedure

Docker Desktop is normally removed from the control panel.

I think that a docker group that seems to have been set by Docker Desktop has been created on the WSL2 side, but I will leave this as it is because I will use it later.

$ cat /etc/group | grep ^docker

Docker Engine installation

This is also the normal installation procedure on Ubuntu

Startup settings

Currently, WSL2 does not start the service from Systemd etc., so it is executed when the shell is started. ~/.bash_profile .I want to describe it in, but I also want to make the dot file group the same as other systems, so I checked whether it was WSL2 and started it if his PID file of Docker was not prepared.

With this alone, it sudo is not easy to use because you will be asked for the password from time to time.

Here, since there is a docker user group left by Docker Desktop , set sudoers so %docker that only the docker group () does not ask for the password for starting the service (NOPASSWD).

$ sudo visudo -f /etc/sudoers.d/docker%docker ALL=(ALL) NOPASSWD: /usr/sbin/service docker start

 by the author.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


DevOps Consultant. I’m strongly focused on automation, security, and reliability.