-
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
Port features.json properties for most common runtime arguments #2
Comments
I like this - will clean up our templates a bit and improve readability. |
Yep! It should future proof the spec as well given interest in different container engines. These can have orchestrators that have subtle tweaks in how these need are set. We don't want to "be the orchestrator", but provide a place to house subset of properties that are specific to dev that need to happen regardless of them - e.g. |
Is is possible to specify overrides for a feature added to devcontainer.json? It may solve a class of issues where the default arguments (like mounts) of feature definitions need to be removed/changed. For example, I added the docker-in-docker feature to my devcontainer.json, but in order to be able to have docker-in-docker enabled in more than one containers on one host, you must mount "features": {
"docker-in-docker": {
"version": "latest",
"moby": true,
"dockerDashComposeVersion": "v1"
//FIXME: can we have "customizations": { "mounts": [ ] } or similar
},
},
// attempt to mount /var/lib/docker to unique :
"mounts": [
"source=UNIQUE-dind-var-lib-docker,target=/var/lib/docker,type=volume"
] Fails because "docker-in-docker" feature def has a built-in mount to /var/lib/docker which conflicts with my uniquely-named volume:
The drop-in features are great until they don't work for rare edge cases. I suppose this issue could be resolved by adding an additional config parameter to disable/rename /var/lib/docker mount, but something like microsoft/vscode-dev-containers#1249 microsoft/vscode-remote-release#5679 FYI: If anyone has this issue, the workaround is to use manual script method docker-in-docker.md#script-use and remove the "docker-in-docker" feature from devcontainer.json. |
We added |
As a part of development for dev container features (#60), we introduced properties for the most common runtime arguments used in
devcontainer.json
'srunArgs
property. The great part about this implementation is that it worked with Docker Compose as well and is abstracted enough to work with other potential orchestrators or container runtimes down the road. It would be awesome to bring these todevcontainer.json
as well.Specifically:
privileged
capAdd
securityOpt
init
mounts
in a revised form that is not quite so engine specificentrypoint
(which would be useful with the proposedoverrideEntrypoint
from Suggestion: use overrideCommand as false by default microsoft/vscode-remote-release#3614 (comment))We could also bring
containerEnv
into Docker Compose as it is infeatures.json
.Ideally we'd continue this trend whenever a new property along these lines is added to
features.json
(and vice versa).The text was updated successfully, but these errors were encountered: