-
Notifications
You must be signed in to change notification settings - Fork 291
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
Feature entrypoint does not fire when Docker Compose definition is used #5983
Comments
This is likely an issue with the extension rather than the script / feature. It also seems to repro in the current VS Code - Insiders @chrmarti , @joshspicer - It looks like the entrypoint configured in In addition to the desktop, if I tweak the devcontainer.json to use |
I also if it is a bug and not something I'm missing, we should probably look at getting this one in for 1.63 since as feature use starts to grow. |
Looks like I can repro in codespace too (both desktop and dind). |
Does adding |
@chrmarti Yep! That's does appear to be the issue since its false by default for Docker Compose. |
@chrmarti - for reference, how is the entrypoint determined if multiple features are used, each with a custom entrypoint? If a user is utilizing a feature with a custom |
verified for me |
Yeah, I would not expect to have to set this manually. |
The default does not override because we didn't have that for Docker Compose before and changing it would break existing setups. |
@chrmarti This won't work because there is no way for the user to know that is the case - so sadly it looks broken as seen here. In terms of existing setups, they made a change, so when this happens it would be clear that the feature is what affected the outcome... and our own bases are setup to work this way. The problem is that, if you to do not alter the ENTRYPOINT, nothing works - so not making that switch really adds little value. The script is essentially /dev/null. If a feature with an entrypoint in feature.json is selected, the entry point is needed since there's no systemd in most images, we end up approximating it with entrypoints. That said, we don't need to not remove the existing entrypoint anyway. We can call the existing entrypoint after all of ours (it's available in the resulting image metadata). This is why I've got these entry points setup to enable chaining. e.g.
At this point, the command can be "as-is", its only the entrypoint that is updated. It's a new behavior yes, but only when you use a feature that has an entrypoint set. Perhaps though there are two bugs if we are also stepping on the existing enterypoint? |
One issue with the chaining is that we would require feature authors to enable that too. I have now come up with an approach that sets the user's entrypoint and command as the new command, so we can use the entrypoint to run the feature entrypoints, then (if overrideCommand is not true) run the user's entrypoint and command and finally go into a sleep loop. We can always do this (also with no feature entrypoints) with the additional benefit of when the user's entrypoint exits, we keep the dev container running with the sleep loop. This might allow us to remove the requirement for the user to have a sleep loop (or |
Doing the same for single containers. The default there is to override the entrypoint and command by default, but the same issue would occur when you add |
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: