Skip to content

Instantly share code, notes, and snippets.

@jawilson
Last active June 4, 2025 18:22
Show Gist options
  • Save jawilson/9f3c0e1aaaf32118f90b374186b22b36 to your computer and use it in GitHub Desktop.
Save jawilson/9f3c0e1aaaf32118f90b374186b22b36 to your computer and use it in GitHub Desktop.
Dotfiles, Devcontainers, and Codespaces

Dotfiles

Demo:

  1. Dotfiles repo: https://github.com/jawilson/dotfiles
  2. Demostration:
    1. Create new WSL distribution:
      wsl --install Debian --name dotfiles-demo
    2. Install git
      sudo apt update && sudo apt install -y git
    3. Clone and install dotfiles
      git clone https://github.com/jawilson/dotfiles.git ~/.dotfiles
      cd ~/.dotfiles
      ./install.sh

Devcontainers

Resources

Demo:

  1. Ensure the following are in your settings.json (dotfiles.targetPath and dotfiles.installCommand are unchanged from defaults):
    {
      "dotfiles.repository": "your-github-id/your-dotfiles-repo",
      "dotfiles.targetPath": "~/dotfiles",
      "dotfiles.installCommand": "install.sh"
    }
  2. Install the Dev Containers (or I'd recommend the Remote Development extension pack
  3. Open a repo with a .devcontainer/devcontainer.json, open the command palate and run Dev Containers: Reopen in Container

Codespaces

Resources:

Demo:

  1. Configure the Github Codespaces settings:
    1. Configure your Dotfiles repo
    2. Add secrets:
      1. AWS secrets (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY)
      2. GitHub Package Registry PAT (you'll want to configure npm in your dotfiles install script)
    3. Enable settings sync
    4. Set Visual Studio Code as preferred editor
  2. Navigate to a repo on GitHub with a devcontainer configured (e.g. this VideoConductor branch)
  3. Code -> Codespaces tab -> "Create codespace on <branch>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment