Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install WSL2 from the Microsoft Store and VS Code. You don’t need anything else! ✨

    • Docker Desktop is not necessary if you have WSL2 version 0.67.6 or higher (check wsl --version)

    • Install the Dev Containers extension in VS Code

  2. Prepare WSL for docker. This may not be necessary in recent versions of Windows 11

    1. Enable systemd by updating /etc/wsl.conf to add:

      Code Block
      [boot]
      systemd=true
    2. Restart WSL (via cmd)

      Code Block
      languagebash
      wsl --shutdown
  3. Install Docker. Follow Docker’s instructions to install docker-ce and docker-compose-plugin

    1. Once installed, add your user to the docker group for later convenience

      Code Block
      languagebash
      sudo usermod -aG docker $USER
  4. Setup SSH agent forwarding by adding the following to .bashrc in WSL. This will allow git to work in the devcontainer

    Code Block
    if [ -z "$SSH_AUTH_SOCK" ]; then
       # Check for a currently running instance of the agent
       RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
       if [ "$RUNNING_AGENT" = "0" ]; then
            # Launch a new instance of the agent
            ssh-agent -s &> $HOME/.ssh/ssh-agent
       fi
       eval `cat $HOME/.ssh/ssh-agent` 1> /dev/null
       ssh-add 1> /dev/null
    fi
  5. Clone the Play repository in WSL (~, not Windows C:/…)

    Code Block
    languagebash
    cd ~
    git clone git@github.com:Spordle/Play.git play
  6. Open it in VS Code

    Code Block
    languagebash
    code ~/play
  7. Relaunch in the devcontainer

    • You’ll see a notification in the bottom-right corner suggesting this

    • You can also relaunch via the Ctrl-P menu by searching for ‘dev containers’

    • This might take some time as it’s pulling and building a few docker images for the first time

    • If it fails to launch, the bottom-right notification lets you open the logs to see what the error is exactly. The error popup is usually vague and super misleading.

  8. Follow README.md for further instructions on how to install and build Spordle Play

    1. https://github.com/Spordle/Play/blob/master/README.md

  9. Create a branch and open your first pull request! 🎉

...