Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jacricelli/ff94a4183d47a6cf3f6a81ee68ea374c to your computer and use it in GitHub Desktop.
Save jacricelli/ff94a4183d47a6cf3f6a81ee68ea374c to your computer and use it in GitHub Desktop.
wsl docker
# https://medium.com/geekculture/run-docker-in-windows-10-11-wsl-without-docker-desktop-a2a7eb90556d
#
sudo visudo
# Docker daemon specification
asdf ALL=(ALL) NOPASSWD: /usr/bin/dockerd
echo '# Start Docker daemon automatically when logging in if not running.' >> ~/.bashrc
echo 'RUNNING=`ps aux | grep dockerd | grep -v grep`' >> ~/.bashrc
echo 'if [ -z "$RUNNING" ]; then' >> ~/.bashrc
echo ' sudo dockerd > /dev/null 2>&1 &' >> ~/.bashrc
echo ' disown' >> ~/.bashrc
echo 'fi' >> ~/.bashrc
sudo usermod -aG docker $USER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment