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

feat(rootfs): Introduce custom Python build #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

razvand
Copy link

@razvand razvand commented Oct 27, 2023

Introduce Dockerfile-based setup for custom (i.e. from source) Python build. It ends up creating a minimal Python Docker image.

@razvand razvand added the enhancement New feature or request label Oct 27, 2023
@razvand razvand requested a review from nderjung October 27, 2023 04:44
Comment on lines 42 to 47
RUN find /usr/local -type f -name "*.so" -exec strip --strip-unneeded {} + && \
find /usr/local -type f -name "*.so" | ldconfig && \
find /usr/local -depth \
\( \
\( -type d -a \( -name test -o -name tests -o -name __pycache__ \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.exe' \) \) \
\) -exec rm -rf '{}' +;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary since we end up with a scratch container.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we're copying the entire /usr/local/bin/ and /usr/local/lib/ directories to scratch. So we still need to clean them before the copying.

@nderjung nderjung changed the title rootfs: Introduce custom Python build feat(rootfs): Introduce custom Python build Oct 27, 2023
Introduce Dockerfile-based setup for custom (i.e. from source) Python
build. It ends up creating a minimal Python Docker image.

Signed-off-by: Razvan Deaconescu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants