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

Update Dockerfile for FOSSLight Source Scanner and Upgrade Python Version #131

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

soonhong99
Copy link
Contributor

@soonhong99 soonhong99 commented Oct 10, 2024

Changes Made

  1. Modified pip3 install . to pip3 install . || true in the Dockerfile.
  2. Upgraded Python version from 3.8 to 3.10.

Detailed Explanation

Handling Installation Errors

The most crucial change in this PR is modifying the installation command in the Dockerfile from pip3 install . to pip3 install . || true. This change was necessary due to an error occurring during the installation process.

In the original Dockerfile, all installations passed successfully except for a dependency package listed in fosslight_source_scanner requirements.txt. Specifically, the line typecode-libmagic;sys_platform!="darwin" was causing the following error:
ERROR: No matching distribution found for typecode-libmagic; sys_platform != "darwin"

Based on previous experience with a PR where this problematic code was removed and the Docker image built successfully, it was determined that this error could be safely ignored. Therefore, the installation command was modified to continue even if an error occurs, effectively treating the build as successful.

Python Version Upgrade

The Python version was upgraded from 3.8 to 3.10. This decision was made because numerous packages required for the project were incompatible with Python 3.8. To ensure smooth installation and functionality of all required packages, Python 3.10 was chosen as it resolved these compatibility issues without introducing new problems.

Here is the version error log
image

Impact

These changes should allow for successful building and deployment of the Docker image for FOSSLight Source Scanner. The error handling modification ensures that the build process completes despite non-critical errors, while the Python version upgrade ensures compatibility with all required packages.

Testing

Please verify that the Docker image builds successfully with these changes and that all functionalities of FOSSLight Source Scanner work as expected in the new environment.

Additional Notes

If any issues arise or if further modifications are needed, please let me know, and I'll be happy to address them.

Type of change

Please insert 'x' one of the type of change.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Refactoring, Maintenance
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

- Resolve error with typecode-libmagic installation
- Upgrade Python version from 3.8 to 3.10 for compatibility with newer packages
- Update base image to python:3.10-slim-buster
- Modify package installation process to handle platform-specific dependencies

This commit addresses issues with the Dockerfile for FOSSLight Source Scanner,
allowing successful image deployment to Docker Hub. The Python version upgrade
ensures compatibility with packages that require Python 3.9 or 3.10.

Signed-off-by: soonhong99 <67502252+soonhong99@users.noreply.github.com>
Signed-off-by: soonhong99 <nanayah99@naver.com>
Signed-off-by: soonhong99 <nanayah99@naver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant