Skip to content

Instantly share code, notes, and snippets.

@apsolut
Last active September 4, 2024 17:50
Show Gist options
  • Save apsolut/768c11f0c5bc370623c3c08d53a1ad41 to your computer and use it in GitHub Desktop.
Save apsolut/768c11f0c5bc370623c3c08d53a1ad41 to your computer and use it in GitHub Desktop.
wsl -u root -e bash -c "apt-get upgrade -y >/dev/null"
wsl bash -c 'sudo usermod -aG docker $USER'
wsl bash -c 'echo CAROOT=$CAROOT'
wsl -u root mkcert -install
wsl -u root service docker start
if (-not(wsl -e docker ps)) {
throw "docker does not seem to be working inside the WSL2 distro yet. "
}
# If docker desktop was previously set up, the .docker can break normal use of docker client.
wsl rm -rf ~/.docker
refreshenv
wsl -u root -e bash -c "touch /etc/wsl.conf && if ! fgrep '[boot]' /etc/wsl.conf >/dev/null; then printf '\n[boot]\nsystemd=true\n' >>/etc/wsl.conf; fi"
wsl ddev version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment