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

python3-pip package is removed after container sign #189

Open
Villain88 opened this issue Feb 12, 2024 · 5 comments
Open

python3-pip package is removed after container sign #189

Villain88 opened this issue Feb 12, 2024 · 5 comments

Comments

@Villain88
Copy link

Villain88 commented Feb 12, 2024

My container requires the python3-pip package to run, however when migrating from gsc 1.4 to gsc 1.6, the package is removed after sign

Steps to reproduce

I used the tag v1.6

Docker file with

...
RUN apt update \
    && apt install -y python3.10 python3-pip
..
  • docker build
  • gsc build
  • ./gsc sign-image

Expected results

python3-pip exists on the system

Actual results

python3-pip has been removed from the system

Additional information

The --no-remove-gramine-deps option has no effect because it only removes/not removes pip packages
I think it makes sense to make removing the python3-pip package optional

@dimakuv
Copy link

dimakuv commented Feb 13, 2024

@jkr0103 @aneessahib Could you look into this?

@aneessahib
Copy link
Contributor

To clarify, the issue is observed only when --no-remove-gramine-deps is used?

@dimakuv
Copy link

dimakuv commented Feb 13, 2024

@aneessahib If I understand correctly, the issues is observed in both cases.

@Villain88
Copy link
Author

To clarify, the issue is observed only when --no-remove-gramine-deps is used?

I think problem is here

I forgot to write that I used an image with Ubuntu 20.04

@aneessahib
Copy link
Contributor

Yes, this was expected. python3-pip was removed to bring down the overall size of the container image (as part of a requirement from another client). We had also discussed the option of not doing this step if python3-pip is already present in the base image - However, this resulted in a condition where the size reduction was not good enough (at the time it looked like the if condition resulted in docker introducing additional layers to the image).
I can think of couple of options

  1. GSC licensing is no longer restrictive, so users are willing to customize the code as needed.
  2. Obvious workarounds - Re-install python3-pip post gsc-sign etc

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

No branches or pull requests

3 participants