devcontainers / templates

Repository for Dev Container Templates that are managed by Dev Container spec maintainers. See https://github.com/devcontainers/template-starter to create your own!
https://containers.dev/templates
MIT License
924 stars 242 forks source link

Does the "platform" key mean anything? #145

Closed jcbhmr closed 1 year ago

jcbhmr commented 1 year ago

unsure if this is the right spot to ask

https://github.com/devcontainers/templates/blob/main/src/java/devcontainer-template.json#L37 image

I see that sometimes it's "Any", and sometimes it's a tool or library, and sometimes it's a programming language?

All that's said in the docs is: image

Basically, what I'm getting at is: do these keywords do anything in this example devcontainer-template.json file?

{
    "id": "jupyter-datascience-notebooks",
    "version": "1.0.0",
    "name": "Jupyter Data Science Notebooks",
    "description": "Use Jupyter Data Science Notebooks with Python, R, Julia, and more.",
    "documentationURL": "https://github.com/devcontainers-community/templates/tree/main/src/jupyter-datascience-notebooks",
    "publisher": "Community",
    "licenseURL": "https://github.com/devcontainers-community/templates/blob/main/LICENSE",
    "options": {
        "baseVariant": {
            "type": "string",
            "description": "Base image. Check the documentation for details.",
            "default": "datascience-notebook",
            "proposals": [
                "base-notebook",
                "minimal-notebook",
                "r-notebook",
                "scipy-notebook",
                "tensorflow-notebook",
                "datascience-notebook",
                "pyspark-notebook",
                "all-spark-notebook"
            ]
        },
        "imageVariant": {
            "type": "string",
            "description": "Image version (tag).",
            "default": "latest",
            "proposals": ["latest"]
        }
    },
    "platforms": [
        "Python",
        "R",
        "Julia",
        "numpy",
        "pandas",
        "tidyverse",
        "much more"
    ]
}

especially that "much more" πŸ˜†

samruddhikhandale commented 1 year ago

Hi πŸ‘‹

Thanks for raising this question. When templates were located in microsoft/vscode-dev-containers, the platforms variable was used for the auto-generated README files.

Example πŸ‘‡

image

Looks like we did migrate the variable so that it could be utilized for auto-generated docs, however, it seems to have slipped though the gaps - I'll update devcontainers/action to utilize it. Wondering, @jcbhmr would that be helpful?

Also, in future this variable could be further utilized by the https://containers.dev/templates website as well for categorizing Templates.

// cc @joshspicer / @bamurtaugh wondering if you're aware of any current use case of platforms variable that I might be missing.

joshspicer commented 1 year ago

Those properties don't do anything today in the CLI, they seem to have been included in the initial spec as metadata for docs, etc.

That said, we have a spec proposal related to this currently on our backlog. The spec issue is for Features, but anything we did there would likely translate to Templates as well. https://github.com/devcontainers/spec/issues/58

bamurtaugh commented 1 year ago

Thanks for opening @jcbhmr, and thanks for looping me in @samruddhikhandale!

@chrmarti do we use "platform" at all in VS Code tooling?

jcbhmr commented 1 year ago

Looks like we did migrate the variable so that it could be utilized for auto-generated docs, however, it seems to have slipped though the gaps - I'll update devcontainers/action to utilize it. Wondering, @jcbhmr would that be helpful?

Sure! I was wondering in my original question if it was used for something like "only for x86 machines" or "only for Windows" or something more hard-and-fast. It appears from this discussion that its more cosmetic than programmatic though. That answers my question! πŸ‘