-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Feature Request: Build Docker by Briefcase and Briefcase Package Web Static #2118
Comments
I also found wunjo-2.0.6b1-py3-none-any.whl, I unpacked it, but I didn't understand how to run it as a flask application. |
I figured out the issue. It turned out very cool. |
FWIW, I think Briefcase already accommodates such a packaging workflow. However, I do not imagine that Briefcase would create the image to deploy and run your app. Instead, that image is the deployment environment for Briefcase's packaging artifact. In this way, you would run |
Agreed - a "Docker" packaging format would make some sense for the Web backend. The complication would be exactly what we put in the Docker container. At present, the static web backend is no more than a folder of files, so it's up to the web host how those files are served. If we produced a Docker backend, we'd need to express an opinion (or provide options for) the web server used inside the container. |
See #2122 for a formalisation of this request. |
Thanks for the answers. I liked that the whl file of my application was compiled, I used it in Docker with env variables, and got a server application from Docker. This solved all my queries. |
What is the problem or limitation you are having?
I am working on a project using Briefcase, and I encountered an issue when trying to build a Docker container for my application. I found information in the documentation about Docker integration (https://briefcase.readthedocs.io/en/stable/reference/platforms/linux/system.html), and I tried running the command briefcase build docker, but it failed with the error message "Unable to clean up from determining if Docker is mapping users." My project is based on Briefcase, and there is a need to run it in a Docker container. To do so, I am currently forced to restructure my app into a regular Flask app, but I wonder if there is a way to leverage the existing pyproject.toml configuration of Briefcase to build a Docker container in a manner similar to the following Dockerfile:
Describe the solution you'd like
I would like to be able to build a Docker container directly using Briefcase, without having to restructure my project. Ideally, Briefcase should offer a way to configure Docker support in the pyproject.toml file and create a Docker container for my application while retaining the existing architecture. I would also like to understand how to package the web static files in a way that allows them to be served through a Docker container without additional modifications.
Describe alternatives you've considered
I have considered changing my application architecture to use Flask directly, outside of Briefcase, in order to facilitate Docker integration. However, I would prefer to keep the existing architecture that Briefcase provides, as it offers useful tooling for packaging and distributing the application. Additionally, I attempted to use briefcase build web static and briefcase run web, but I encountered an HTML page with a command like import runpy result = runpy.run_module("wunjo", run_name="main", alter_sys=True). I am unclear about what this is for and how to proceed. When using briefcase package web static, the resulting ZIP file contains only wheels and not the app program itself, and I am unsure how to deploy it.
As an alternative, I tried to package the web static files and connect my Flask app through Briefcase with Docker, but the process was not straightforward, and I did not find clear instructions for deploying it successfully.
Additional context
It would be very helpful to have clearer documentation or support for building Docker containers directly with Briefcase while maintaining the original architecture, or at least guidance on how to integrate Docker without changing the structure of my app. I am also looking for more information on how to properly handle static files in Briefcase when targeting Docker containers.
The text was updated successfully, but these errors were encountered: