-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add support for custom build-prerequisites Dockerfile #260
Add support for custom build-prerequisites Dockerfile #260
Conversation
This seems like it would have "interesting" interactions with the 'export combined' mode. We might want to have a template that shows how to create a rational custom Also, if I'm parsing this correctly, we copy the whole context directory before we run build. It's cheap for the built-in images, but might be expensive if the custom Dockerfile is pulling in, say a large console SDK image, which can easily be over a gigabyte. In fact, I realise that copying the context directory is probably needless in all cases, as we're only doing it (AFAICT) so we can read the Jinja'd Dockerfile instead of the one in the tree, and as it happens, the Dockerfile doesn't need to be in the context, so we could template-process the Dockerfile into a tempfile, and use the in-tree context with the tempfile as the Dockerfile. Unless that's something that BuildKit introduced; I realise now I've not checked this explicitly with the legacy builder, but I habitually include |
This PR already stopped doing that, see https://github.com/adamrehn/ue4-docker/pull/260/files#diff-5e6ae65114a21de05700d099ef76362cd0b68348cefe4f45b2b17f9a99033509L91-L94 Now only Jinja-processed Dockerfile is written to temp dir. The separation of Dockerfile/context paths is the main reason of this PR size, I had to tweak several things that relied on them living in the same directory. |
Ohh, whoops. I thought the |
There are some design questions here:
|
This commit adds `--prerequisites-dockerfile=[path]` flag that allows injecting custom image in place of ue4-build-prerequisites. Note that vanilla ue4-build-prerequisites is still build and available with ue4-base-build-prerequisites name, so user-provided Dockerfile can use it as a base. Primary goal of this feature is to allow installation of platform SDKs before engine is checked out into image. Placing platform SDKs in to ue4-build-prerequisites image allows to reuse the same SDKs for multiple engine builds.
93a674c
to
48e929f
Compare
Okay, merging this as-is (but we will pretend that this feature is experimental and subject to change). |
This commit adds
--prerequisites-dockerfile=[path]
flag that allows injecting custom image in place of ue4-build-prerequisites.Note that vanilla ue4-build-prerequisites is still build and available with ue4-base-build-prerequisites name, so user-provided Dockerfile can use it as a base.
Primary goal of this feature is to allow installation of platform SDKs before engine is checked out into image. Placing platform SDKs in to ue4-build-prerequisites image allows to reuse the same SDKs for multiple engine builds.