-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Features] Supported Architectures/OS #58
Comments
Makes sense. "version" could be "distro"? And "os": "linux" can be omitted (at least for now). |
Yeah that's reasonable - to make it clear this is OS stuff, we could do
If no osVersion is specified, it's assumed that it works for everything. |
This may be an uncommon case, but one of the Features I maintain runs on various architectures in Debian, but only on amd64 in Ubuntu. |
"architectures": [ "x86_64", "arm64"],
"osVersion": {
"debian": ["10", "11"],
"ubuntu": ["20.04", "18.04"],
"alpine"
} |
Unfortunately that wouldn't be valid json.
This is a good point. There could be an OS and version specific override for architectures since that would be a bit of an exception case. But I've definitely seen situations where a 3p Linux package feed only contains x86 for certain distros. "architectures": [ "x86_64", "arm64"],
"osVersion": {
"debian": ["10", "11"],
"ubuntu": { "architectures": ["x86_64"] },
"alpine": true
} or if it was only a specific version: "architectures": [ "x86_64", "arm64"],
"osVersion": {
"debian": ["10", "11"],
"ubuntu": [ "22.04", { "version": "20.04", "architectures": ["x86_64"] } ],
"alpine": true
} We also need to decide if we're aligning on codenames for versions or version numbers. For x86, we'd also need to decide between "amd64" which you see pretty frequently or x86_64. Or I guess we could support both. |
Indeed, this is not a valid JSON. What about making "architectures": ["x86_64", "arm64"],
"osVersion": [
{
"name": "debian",
"versions": ["10", "11"]
},
{
"name": "ubuntu",
"versions": ["20.04", "18.04"]
},
"alpine"
] |
Hmmm. That would be more verbose for the more common case of only a subset of versions working. |
I'm not sure why you would make the alpine section any different to the debian or ubuntu. Its a stretch to imply
Using a generalized convention labels may help avoid over-specification: "3" (all 3.x.x minor and incremental versions), "3.16" (all 3.16.x incremental versions), "3.16.3" (a specifically identified version). |
It's not specific to alpine. An alternative would be |
Agreed, a wildcard version identifier also occured to me, and it makes sense that it apply to any osVersion, as well as the architectures. |
Can we also let a feature declare the shells they support? Some features only support bash, so when I set |
At image build time we can check against
|
I know this issue is kind of old but I think this feature deserves some love :-) |
This proposal is an enhancement idea to the current dev container features proposal.
@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 microsoft/vscode-dev-containers#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
...where "true" means any version.
Originally posted by @Chuxel in #48 (comment)
The text was updated successfully, but these errors were encountered: