4 ms·
Not a trivial thing to run Docker natively inside of a WSL2 environment - at least my attempts to install straight docker strictly inside Ubuntu running in WSL2
by alanwreath 5y ago
Not a trivial thing to run Docker natively inside of a WSL2 environment - at least my attempts to install straight docker strictly inside Ubuntu running in WSL2 always resulted in Ubuntu’s attempts to reach some .exe with regard to Docker. I did learn some fun facts WRT Linux in WSL2 - it doesn’t have systemd installed by default.
- spooneybarger 5y agoI've never had a problem with it. I've been using docker engine in WSL2 for a couple years. I install `docker.io` via apt and its good to go except that package has on some ubuntu versions been missing the /etc/init.d/ startup script. I build my WSL2 environments via Dockerfile. You can see everything here: https://github.com/SeanTAllen/wsl-environments/tree/main/ubuntu-20-daily https://github.com/SeanTAllen/wsl-environments/tree/main/ubu... Using that dockerfile I can then export the file system as a tar (https://wiki.seantallen.com/notes/docker-export-filesystem/ https://wiki.seantallen.com/notes/docker-export-filesystem/) and import into wsl using the wsl import command.
- naikrovek 5y agowell the installation process seems to have changed in the last 2 years. installing `docker.io` is not enough to get docker running in WSL 2 anymore.
- ldavison 5y agoI was able to get podman setup in WSL2 pretty easily following this: https://www.redhat.com/sysadmin/podman-windows-wsl2 https://www.redhat.com/sysadmin/podman-windows-wsl2