d2 icon indicating copy to clipboard operation
d2 copied to clipboard

Add a `.devcontainer` manifest

Open fwcd opened this issue 2 years ago • 0 comments

This could be useful for quickly spinning up a dev environment, e.g. in a local container or a codespace:

  • https://code.visualstudio.com/docs/devcontainers/create-dev-container
  • https://github.com/microsoft/vscode/tree/main/.devcontainer (an example)

The setup should follow the standard Ubuntu setup:

  • Run Scripts/install-dependencies-apt or install the equivalent dependencies manually
  • Download Swift from https://www.swift.org/download and place it e.g. in /opt/swift
    • Add symlinks to make it accessible from the PATH:

      ln -s /opt/swift/usr/bin/swift /usr/local/bin/swift
      ln -s /opt/swift/usr/bin/sourcekit-lsp /usr/local/bin/sourcekit-lsp
      

The only stumbling block is that the default image in GitHub Codespaces is currently based on Ubuntu 20.04, which doesn't have libstdc++-12-dev. However it seems like the installed libstdc++-9-dev should be fine too.

Alternatively we could of course try use something based on the swift-Docker image, similar to our production image (though of course without the slimmed down runner image or cross-compilation).

fwcd avatar Nov 03 '23 18:11 fwcd