Using "features" with Bring Your Own Image #7807
-
Can "features" (https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/container-features/src/features.json) be used with bringing your own image? We have found that our custom CicleCI images make great development images. They are base on Ubuntu and the scripting seems to be compatible with VS Code's dev container features. For example, we wanted to use the "common" feature to make our CircleCI images feel more Codespaces'y. I ideally we could have done something like this. "features": {
"common": "latest"
} But from the creation log, I saw a message that they would not be applied to the image. So we have had to resort to doing something like this in our Dockerfile. # Install Codespaces "common" features.
RUN curl -s https://raw.githubusercontent.com/microsoft/vscode-dev-containers/main/script-library/common-debian.sh > /tmp/common-debian.sh \
&& bash /tmp/common-debian.sh true automatic automatic automatic false Perhaps this is an opportunity for 3rd-party features? Tho I do think if the OS is compatible, many folks would love to use the "common" feature via JSON too. Maybe y'all publish it as a 3rd-party one too? "features": {
"@codespaces/common": "latest"
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Some good news here - we did add common as a feature and should ship soon. You'll be able to do something like the following:
Or for options:
Like other features, it focuses on Debian/Ubuntu based images.
Yeah we are currently looking into this one as well. The goal is you'll be able to reference To give an example, the common script would technically be |
Beta Was this translation helpful? Give feedback.
-
@Chuxel , is there any word on when we might be able to start taking advantage of those mechanics? We're currently handling a bunch of our shared image configuration tasks by pulling in a private repo with a similar strategy to the one @metaskills referenced for pulling in the common-debian features in a postCreate hook :
I was wondering if we could shim in our own feature from that repo by having the
and then just dragging it in as desired in the
Ideally I'd like to implement a shim that's close enough to what the eventual 3rd party feature interface would be. That way we can switch over to the official implementation with a minimal amount of modification to our |
Beta Was this translation helpful? Give feedback.
Some good news here - we did add common as a feature and should ship soon. You'll be able to do something like the following:
Or for options:
Like other features, it focuses on Debian/Ubuntu based images.
Yeah we are curren…