-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Description
I'm working on creating a few of my own templates, but noticed that options that are using "proposals" aren't allowing free form input? It either just auto selects the default or inputs an empty string. This contradicts what the docs say here:
https://containers.dev/implementors/templates/
A list of suggested string values. Free-form values are allowed. Omit when using optionId.enum.
Here is my devcontainer.json template:
{
"name": "${templateOption:devcontainer_name}",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": ["esbenp.prettier-vscode"]
}
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/j2udev/devcontainer-features/oh-my-posh:0": {
"theme": "${templateOption:oh_my_posh_theme}"
},
"ghcr.io/j2udev/devcontainer-features/eza:0": {
"theme": "${templateOption:eza_theme}"
},
"ghcr.io/j2udev/devcontainer-features/bat:0": {
"theme": "${templateOption:bat_theme}"
},
"ghcr.io/j2udev/devcontainer-features/fzf:0": {},
"ghcr.io/j2udev/devcontainer-features/lazygit:0": {}
}
}and here is my devcontainer-template.json
{
"id": "base-dockerfile-features",
"version": "0.1.2",
"name": "Base/Dockerfile/Features",
"description": "A base template that creates a Dockerfile and uses features",
"documentationURL": "https://github.com/j2udev/devcontainer-templates/tree/main/src/base-dockerfile-features",
"licenseURL": "https://github.com/j2udev/devcontainer-templates/blob/main/LICENSE",
"options": {
"devcontainer_name": {
"type": "string",
"description": "The name of your Dev Container"
},
"ubuntu_version": {
"type": "string",
"description": "Ubuntu version",
"proposals": ["noble", "jammy", "focal", "bionic"],
"default": "noble"
},
"oh_my_posh_theme": {
"type": "string",
"description": "oh-my-posh theme",
"proposals": [
"bubbles",
"catppuccin",
"craver",
"gruvbox",
"j2udev",
"robbyrussell",
"sonicboom_light",
"sonicboom_dark",
"tonybaloney"
],
"default": "j2udev"
},
"eza_theme": {
"type": "string",
"description": "eza theme",
"proposals": [
"catppuccin",
"dracula",
"frosty",
"gruvbox-dark",
"one_dark",
"tokyonight"
],
"default": "tokyonight"
},
"bat_theme": {
"type": "string",
"description": "bat theme",
"proposals": [
"default",
"Dracula",
"GitHub",
"gruvbox-dark",
"gruvbox-light",
"Monokai Extended",
"Nord",
"OneHalfDark",
"OneHalfLight",
"Solarized (dark)",
"Solarized (light)",
"TwoDark"
],
"default": "default"
}
},
"platforms": ["Any"]
}Feel free to see for yourself by trying the template:
ghcr.io/j2udev/devcontainer-templates/base-dockerfile-featuresReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working