-
Notifications
You must be signed in to change notification settings - Fork 356
fix(Dockerfile): #10999
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
base: main
Are you sure you want to change the base?
fix(Dockerfile): #10999
Conversation
Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
Scancode utility scancode-license-data has a flaw that inside some environments ignores the path flag. The dependency on distutils, deprecated since Python 3.12+ force install of setuptools to match requirements, but not properly a substitute for distutils. Signed-off-by: Helio Chissini de Castro <[email protected]>
0717836 to
f551f1a
Compare
| click==$PYTHON_CLICK_VERSION \ | ||
| setuptools=="$PYTHON_SETUPTOOLS_VERSION" \ | ||
| uv="$UV_VERSION" | ||
| uv=="$UV_VERSION" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @janniclas! However, please have a look at the contribution guidelines, esp. the part about crafting commits. We're rather strict about not mixing independent fixes / changes into a single commit.
So for example this line is a correct fix for something that's totally unrelated to making the Docker image build on a Mac. And as such this change should be separated out into another (preceding) commit as part of this PR (there's no need to create another PR).
Also, the commit messages should detail why a change was made in a particular way, and not just repeat what was done, as that can be seen from the diff 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update coming soon :)
Signed-off-by: Jan-Niclas Struewer <[email protected]>
ScanCode, especially on macOS due to the used Python installation, needs some explicit dependencies (especially click and setuptools) to work correctly. The dependencies must be installed before installing ScanCode for it to work properly. Signed-off-by: Jan-Niclas Struewer <[email protected]>
f551f1a to
42e706a
Compare
|
I've tested the Dockerfile on a Linux and Mac machine and was able to generate a SBOM for a small project (https://github.com/fraunhofer-iem/spha-ui). However, on a larger project (https://github.com/microsoft/vscode) the analyzer crashed when running the docker container on my Mac. This looks like a runtime problem unrelated to the Docker image so that shouldn't keep us from wrapping this up. Error for reference: |
Indeed. That looks more like an issue with a Mac-specific Node package, similar to issues with fsevents that we saw before. |
These changes address the build issues I encountered on my Mac. The changes were tested on arm and x86 and should hopefully work.
If I find time this afternoon I might update the Ruby installation as suggested by @heliocastro in #10882. However, this PR can also be merged without these changes.
Changes made:
PYTHON_CLICK_VERSIONto.env.versionsandDockerfileto explicitly fulfill the requirements of ScanCode (there were problems especially on MacOS without the explicit dependency)