You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a python module that registers a console entrypoint (see https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html) via setuptools. The entrypoint of my container invokes this command (which in turns invokes itself several times). The resulting slim image contains the exeutable in my shell's path however it does not work. Attempting to run the command from the resulting slim images produces:
# notectl
Traceback (most recent call last):
File "/usr/local/bin/notectl", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3254, in <module>
def _initialize_master_working_set():
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3237, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 787, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'noteworthy==0.0.1' distribution was not found and is required by the application
Looking in /usr/local/lib/python3.8/sites-packages/ I can see that the package referenced in the error above is included in the resulting slim image. I
I'm not sure how to troubleshoot this. Any advice is much appreciated!
The text was updated successfully, but these errors were encountered:
@etherai do you mind sharing the ENTRYPOINT/CMD instructions from your application image? What kind of python base image are you using? Is it Alpine-based? Can you share your docker-slim build command line parameters? Curious how you invoke it... Can you also enable debugging (using the global --debug flag) and the container console logs (using the --show-clogs build command flag)? Your build command should look like this (i assume your app is not a server): docker-slim --debug build --show-clogs --http-probe=false YOUR_TARGET_IMAGE
I have a python module that registers a console
entrypoint
(see https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html) via setuptools. The entrypoint of my container invokes this command (which in turns invokes itself several times). The resulting slim image contains the exeutable in my shell's path however it does not work. Attempting to run the command from the resulting slim images produces:Looking in
/usr/local/lib/python3.8/sites-packages/
I can see that the package referenced in the error above is included in the resulting slim image. II'm not sure how to troubleshoot this. Any advice is much appreciated!
The text was updated successfully, but these errors were encountered: