I'm working on some "common sense" hardening of one of my docker containers and my line of thinking suggests that I could attempt to uninstall APK and PIP from the Alpine linux image after I finish installing all of my dependencies.
I'm having a hard time finding any information on doing so. My line of thinking is that the container is ephemeral so there would never be a need to install anything to a running container.
pip
for example as you wont install anything in production unless there is a need for that and it should be in a few cases. however I would leaveapk
there so i can install pip if i have to.. Also running the container as non root would prevent a non root user to use apk itself – Stumper