Skip to content
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

Provide a way to inject environment variables and/or scripts into the Docker container used for Linux builds #886

Closed
freakboy3742 opened this issue Sep 29, 2022 · 0 comments · Fixed by beeware/briefcase-linux-appimage-template#22
Labels
enhancement New features, or improvements to existing features. linux The issue relates Linux support.

Comments

@freakboy3742
Copy link
Member

AppImage builds require that most dependencies are build from source. However, in order to build Cryptography, it is necessary to install a Rust development toolchain. This can't be done with a simple system_requires declaration.

If you revert to an older version of Cryptography (e.g., 3.4.8) where the Rust build was optional, you still need to declare an environment variable (CRYPTOGRAPHY_DONT_BUILD_RUST=1) to disable the Rust build.

Describe the solution you'd like

Functionally - it should be possible to install Cryptography - either a recent release, or a historical pre-rust release.

This likely requires the ability to inject full build steps into the Docker image used to build AppImages.
e.g.,

extra_docker_steps = [
   "ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1",
   "RUN echo 'hello world'",
]

or

extra_docker_steps = [
   "RUN curl https://sh.rustup.rs -sSf | sh",
]

These declarations would be injected into the Dockerfile - probably towards the end of the Dockerfile, after the installation of system packages.

Describe alternatives you've considered

We could make a special case of Rust, and add a enable-rust = true option; however, the more flexible option will be to provide complete environment flexibility.

extra_docker_steps could also be a single multiline string, rather than a list of strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features. linux The issue relates Linux support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant