You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"sudo service docker start">>~/.profile
#echo "cd /mnt/" >> ~/.profilesource~/.profile
Considerations
#To restart wsl (use in case it didn't work)
wsl --shutdown
# to communicate containers don't use localhost, point to: [ubuntu terminal] - the first ip that appears
ip addr | grep eth0 | grep inet
# for for ensuring docker service is running on startup to workaround having to deal with sudowsl.exe-u root service docker status || wsl.exe-u root service docker start
Thanks @martinsam16 for this, great info.
For for ensuring docker service is running on startup to workaround having to deal with sudo I have configured this.. wsl.exe -u root service docker status || wsl.exe -u root service docker start
For your own sanity's sake do not add the plain service start command into your .profile, it will annoy you with every terminal you open. use this instead:
if ! service docker status > /dev/null; then
echo "docker service not running, starting..."
sudo service docker start
fi
tks