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
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
Install Docker Engine on Ubuntu
Estimated reading time: 10 minutes Docker Desktop for Linux Docker Desktop helps you build, share, and run containers…
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
$ sudo visudo -f /etc/sudoers.d/docker%docker ALL=(ALL) NOPASSWD: /usr/sbin/service docker start
by the author.