-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[proposal] Allow Features to contribute lifecycle hooks #181
Comments
Should we label this with finalization, now that the proposal is merged into the spec? |
Hi, I want use this functionality to JuliaLang/devcontainer-features#9 Is there a recommended path for scripts to be placed in containers at this time? It would be great if the recommended paths were mentioned in the documentation. |
Given that any base image can be used with Features, I don't think our guidance on where to place scripts would be too meaningful. Functionally the script needs to be readable and executable by the remoteUser Looking at https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard, somewhere like |
Thanks for the reply. |
Assigning to May for docs updates on containers.dev. |
Changes have been accepted into the specification and a PR has been published with these changes for containers.dev. |
relevant to: #60
Proposal
Introduce the following properties to devcontainer-feature.json, mirroring the behavior and syntax of the
devcontainer.json
lifecycle hooks.Example
Lifecycle scripts are looked up relative to the root of the Features source directory, which is bundled up as an archive when distributed. Features already support distributing arbitrary scripts via the registry, this proposal will now allow the Feature to contribute to the build's lifecycle system.
Feature lifecycle hooks will be prepended to the lifecycle hooks (if any) declared by the current
devcontainer.json
. Lifecycle hooks will be prepended in the order that the Feature's installation script was executed. Commands will be joined in such a way that a failure in any one lifecycle hook, will indicate a failure for that entire lifecycle hook execution.The text was updated successfully, but these errors were encountered: