-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Allow injection of arbitrary Dockerfile content. #22
Conversation
I got an email notification of a comment from @rmartin16, which I guess he's deleted now, but I think it's a good question:
I see that the use of this feature in beeware/Python-support-testbed#5 assumes (in the Running the commands as root might make the installation of Rust a bit less convenient, but it makes the overall feature easier to understand. It means one less thing for the user to learn (since anyone who knows about Docker knows it runs things as root by default), and it saves them from having to switch back to root if their commands require it. |
(ahhh....I did delete my comment so I could add it as part of a review; however, it seems since my review is "Pending", the comment apparently isn't viewable by others. TIL :) |
|
Dammit... wrong button :-) Ok, so... there's 2 different pieces here:
My original attempt at fixing (1) did put the injected block just before the However, in the general case of (2), that won't always be the case; I'm sure there will always be examples where we need commands run as I can see four possible solutions (five if you count "don't allow user customization at all").
This is very much "messy, but it works", and only requires a single setting.
This makes
My YAGNI instinct leans somewhere between 1 and 3. I like the simplicity of a single setting, inserting content at the end of the file. However, I'd be interested in any other opinions. |
I like option 2; I also think that's a fine line for saying "further modification requires a fork". However, maybe better is to just provide an option to use an arbitrary Regardless, given the apparent nature of rust installs and the absence of a need to do arbitrary things as root, I'm good with option 1 too. |
I think YAGNI suggests we should do option 1, i.e. keep the current behavior, but document the USER issues in more detail. |
I've added some clarification to the Briefcase docs in beeware/briefcase#963. |
The existing Dockerfile allows for very specific customisations, such as installation of additional system packages. However, sometimes that is insufficient.
For example, installing the Python
cryptography
package requires a Rust compiler, but it is not possible to installrustc
using
apt-get
; you need to run arust-up.sh
script.This template update allows for an end-user to inject arbitrary Dockerfile content into their project configuration. See beeware/Python-support-testbed#5 for an example of this in use.
Fixes beeware/briefcase#886.
Refs beeware/Python-support-testbed#5
PR Checklist: