Open sabre1041 opened 8 years ago
I debated about this. Then I bought that we're just moving the folder just because the MS web server doesn't really care. I don't know what is the rational I guess.
This would occur in the S2I process and would only result in 1 layer in total
Ben @bparees, what's the rationale for other S2I images copying the source (which was injected in /tmp
) to the app home, rather than using the source in-place?
@jawnsy it's a more general solution. Although for some images it's just a direct copy, for others we're doing more manipulation and moving different things to different locations within the final image.
so if you want to write an image that sets the io.openshift.s2i.destination label to the final target, and have an assemble script that doesn't actually move/copy the code, i think that could be fine.
@bparees Ah, thanks for the explanation. I had thought it was because the stuff in /tmp
was meant to be ephemeral (i.e. a volume mounted in, rather than stuff copied into the container), but evidently the files are still available at runtime.
@alberttwong I think it'd be a good idea to set the io.openshift.s2i.destination
label to /opt/app-root/src
if you want to avoid copying/moving in the assemble
script, just to make clear that the files aren't "temporary" - though it sounds like it wouldn't make any functional difference.
The application source that is injected into the builder as part of the S2I process should be moved to another folder to fall into line with other S2I builders. See the following examples below:
Most copy these files to the home directory (same as in this builder
/opt/app-root/src
)