lawyersnomad.blogg.se

Docker desktop for ubuntu 20.04
Docker desktop for ubuntu 20.04





docker desktop for ubuntu 20.04

This will only execute once, when Ubuntu is started. Just sudo vi /etc/wsl.conf with the following contents: Windows 11 makes this even easier (if you can upgrade) with a special configuration for services you want to run when the WSL instance starts. The former is executed only for login shells, but the later is executed for all interactive shells, adding additional overhead. You do not need to make modifications to your sudoers since wsl.exe -u root executes the session as the root user without needing a password.īut definitely use your ~/.bash_profile for this, not ~/.bashrc. Simply add the following line to your ~/.bash_profile (since it sounds like you are using Bash): wsl.exe -u root -e sh -c "service docker status > /dev/null || service docker start" However, if you really do want to go this route, there's a much easier way than the other answer. That said, it's not a horrible option for WSL, at least on Windows 10.

docker desktop for ubuntu 20.04

Second, modifications like this tend to "accumulate" over time, making troubleshooting your shell more difficult in the future. First, I like to keep my startup scripts as lean as possible for best performance. Personally, I'm not a huge fan of this method. You've already seen the other answer to modify your startup scripts. If you want it to automatically start, there are several options: Run this instead of trying to manually replicate the startup process.

#Docker desktop for ubuntu 20.04 full

You can see the full script by examining /etc/init.d/docker. This handles the daemonization of it along with many other tasks. The standard way to run the Docker Engine daemon (without Docker Desktop) under WSL Ubuntu is simply: sudo service docker start







Docker desktop for ubuntu 20.04