devcontainers / devcontainers/spec
[Features] Supported Architectures/OS
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
This proposal is an enhancement idea to the current [dev container features proposal](https://github.com/devcontainers/spec/blob/main/proposals/devcontainer-features.md).
---
@edgonmsft @chrmarti @joshspicer @craiglpeters One other thought. I think at one point we'd discussed the idea that a feature could declare the operating systems and architectures it supports. Given the number of hiccups we've seen with arm64 installs with existing features and PRs like https://github.com/microsoft/vscode-dev-containers/pull/1513 (for Gentoo) driving things into different base OS distros, I think it may be a good idea to include this in the spec from the beginning.
We could have normalized architecture values and then support for /etc/os-release detection based on ID or ID_LIKE for distribution. We can also detect the version in a similar way. Most of the features have some code in them to detect and block based on these values. Moving it into the core spec just makes things easier for feature authors and we can provide UX hints if a feature isn't expected to work given the current environment.
e.g., something like this might work
```
"architectures": [ "x86_64", "arm64"],
"os": "linux",
"version": {
"debian": ["10", "11"],
"ubuntu": ["20.04", "18.04"],
"alpine": true
}
```
...where "true" means any version.
_Originally posted by @Chuxel in https://github.com/devcontainers/spec/issues/48#issuecomment-1170035230_
Contributor guide
Assessment
This issue has not been assessed yet.