This repository shows how to use the Swift for VS Code Extension inside a GitHub Codespace. To use the extension, Swift needs to be installed. In a Codespace, this can be achieved by deploying a custom dev container based on a official Swift Docker Image in that Codespace.
- Create a
.devcontainer
directory inside your workspace - Place the
devcontainer.json
file as well as yourDockerfile
inside the.devcontainer
directory- Dockerfiles for different versions of Swift are available here: https://github.com/apple/swift-docker
- See .devcontainer for an example configuration
- Rebuild your Codespace using this container configuration
- Install and enable the Swift for VS Code Extension in your Codespace
More information on deploying a custom dev container: Codespace docs