Alllow features to copy from another images (infer devcontainer dockerfiel) #516
ThePlenkov
started this conversation in
Ideas
Replies: 1 comment
-
Actually I have one real example:
I'd like to achieve something like this with a feature without creating Dockerfile. Is it possible? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Let's assume we have a feature Z which installs Z command with a script.
Let's assume this script takes few minutes to update dependencies and install/build the package.
If we use feature + we develop something in a remote container, rebuilding the container would require us to wait for this feature to be installed again and again.
At same time let's say there is already another container where Z is already installed and avilable as compiled executable file.
So copying this file from prebuilt container would be enough.
So what I do now in my docker file:
This approach may save me hours a month only by reducing build time, copy happens immediately, moreover because it's a docker image - this image won't be downloaded again and again - it will take it from cache.
So instead of minutes i spend now less than a second to copy 1 file.
Now let's get back to features. If feature is used ( this is how I understand ) - it will run install.sh in the already built image.
So image rebuild would defintely trigger all features reinstallation.
At same time only if we could to have another API from a feature definition where we could inject certain lines in a generated devcontainer Dockerfile - then this problem wouldn't exists.
We could insert RUN, COPY, FROM commands as we would do this in own custom Dcokerfile.
What do you think of this approach?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions