Skip to content

Instantly share code, notes, and snippets.

@djpnewton
Last active June 16, 2022 01:20
Show Gist options
  • Save djpnewton/bf352c971bb66706748b5829b4bc0bb8 to your computer and use it in GitHub Desktop.
Save djpnewton/bf352c971bb66706748b5829b4bc0bb8 to your computer and use it in GitHub Desktop.
my notes using docker with WSL2

Where are the docker volumes mounted in windows?

\\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes

Where are the docker desktop bind mounts in windows?

\\wsl$\docker-desktop-data\mnt\wsl\docker-desktop-bind-mounts\Ubuntu-22.04

How do I deal with the following issue with a bind mount?

ERROR: for web Cannot start service web: error while creating mount source path '/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-22.04/246303549934e585dd71678239fdc069785849a54fe17171b2d9d502adeff102': mkdir /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-22.04/246303549934e585dd71678239fdc069785849a54fe17171b2d9d502adeff102: file exists

  1. open docker desktop troubleshooting screen and click "Restart"
  2. delete the bind mount subdirectory while docker desktop is restarting

How do I restart WSL (get my RAM back)?

wsl --shutdown

How do updates the system hosts file?

notepad c:\windows\system32\drivers\etc\hosts

Other Notes:

  • Another thing that is useful is deleting the config.json file from your WSL home (~/.docker/config.json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment