devcontainers / devcontainers/spec

[Features] Supported Architectures/OS

Open
#58 13 comments 12 reactions 0 assignees View on GitHub
proposal
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.