-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Is it possible to build a python web image in more flexable way which will following some python docker best practice. #592
Comments
Yes, I have seen this link and followed it to build out the image, but the file layput of the result image is bad for me. I am just following bazel and rules_python tutorial to make bazel works in our repository. I am not sure If it is possible to make a Also I not aware what the runfiles means to be in bazel, So I am here for some advice. And I have following |
could you elaborate more what you mean by this? the dockerfile you posted above is how you build a python image when you are not dealing with Bazel, but when using Bazel, some of those commands are replaced by rulesets such as rules_py. For instance pip install becomes, Most people don't care about how files laid out in the container filesystem, therefore they simply use what Bazel calls runfiles so that the behavior of the container matches the py_binary. That said, if you have some specific filesystem layouts constraints you can use tar rule to put things where you want. |
first, good image
I would like to list the issues I faced now. I build oci image follow this example bazel rules_python entryscript and runfiles import difficulty to customize the container running.My container is a fastapi webapp. In bazel local, I create a main.py so Also, I would like to add two python installed and image size much bigger.It seems be the bug of rules_python, see this bug. I cannot use aspect rules_py cause of we have some developers using windows system as their work environments. The rules_py used bash to do its works, It seems unable to work on windows. second, dockefile in bazel
I have go through the last rules_py py_venv
Thanks for you advice. After check the implementation code of Also we have many different images now, which belongs to different teams. I am trying to introduce bazel As additional, I realized |
I understand the concern, but unfortunately there nothing here we can fix in rules_oci. What you are talking about is Runfiles which is necessary when using rules_py so that everything that works in If you want to have a filesystem layout that similar to standard python setups outside Bazel, then you can do that yourself by using As for python dependency, that issue belongs to rules_python, not rules_oci. Thanks for filing the issue, but i don't there is anything here we can fix. |
I have build our docker image in follow fold layers now.
how to make such layer in rules_oci?
After following example, I got a image which is hard to use.
For example, We would like to add
ddtrace-run
command prefix in k8s cluster, but this seems hard to done in the built image.And If sometimes we need to exec into contains to do some debugging, The layout and script entry seems hard for our debug process.
The text was updated successfully, but these errors were encountered: