Digital Marketing

Running Docker inside Ubuntu with WSL2 on Windows 10

Enable Docker for Ubuntu on Windows via WSL2:

Go to Docker Desktop > Settings > Resources > WSL Integration

Make sure you have “Enable integration with my default WSL distro” selected and also turn on each distro.

Now you can launch Ubuntu and without even installing “docker” in Ubuntu you should be able to run the “docker” command:

$ docker ps -a
CONTAINER ID   IMAGE                                                         COMMAND                  CREATED      STATUS                       PORTS     NA
MES
7b5806fcd967   vsc-vscode-remote-try-java-7082d7a76a508a754975227521a1e638   "/bin/sh -c 'echo Co…"   5 days ago   Exited (255) 2 minutes ago             ex
citing_shamir
6ea30d1e64d4   vsc-vscode-dockers-8f87a2becb47231eb8a5f3a96484679c           "/bin/sh -c 'echo Co…"   5 days ago   Exited (0) 5 days ago                  lu
cid_noyce


Docker uses WSL2 for its virtualization. Docker is just another distro that runs on top of WSL Linux’s kernel.



> wsl -l

Windows Subsystem for Linux Distributions:

Ubuntu (Default)

docker-desktop-data

docker-desktop

Comments

Popular posts from this blog

Make online money from the Internet