Add GitHub Copilot to new VS Code Dev Containers on your machine
Here are some steps you can use on your local machine when you want to use GitHub Copilot in dev containers, but can't or don't want to add GitHub Copilot to the dev container's configuration. You can change your VS Code settings for dev contain so that the GitHub Copilot extension will be installed in new dev containers on your machine when they are created.
Steps:
Navigate to VS Code Settings (CTRL+,)
Search for:
Dev Containers: Default Extensions
Click the Add Item button
Enter:
github.copilot
The GitHub Copilot extension will be installed in subsequently created container images.
For pre-existing dev containers, you'll need to manually install the extension each time you open the container. Or you can delete the dev container and the associated image and recreate them.