containerbase / base

The containerbase project's base image source
MIT License
36 stars 41 forks source link

OpenShift compatibility #1

Open rarkins opened 3 years ago

rarkins commented 3 years ago

I think our images have previously aimed at v3 OpenShift compatibility but may not be v4 compatible. In particular we set USER 1000 but may rely on hardcoded /home/x. For some of our tools we rely on them finding config in their home directory.

I found a discussion prior to v4 which gives some hope that we might still be able to put them in /home/x and it works despite random UIDs: https://github.com/openshift/origin/issues/23369#issuecomment-511387505

If as that comment indicates we can set HOME=/home/x and ensure it's writable by group 0 then it could be enough for tools to find their "home directory config" regardless of what UID they run as.

Another question remains though: is it forbidden to set USER 1000 in our images for OpenShift compatibility as seemed to be recommended in OpenShift v3, or we just need to be aware of its limitations.

rarkins commented 3 years ago

https://www.openshift.com/blog/a-guide-to-openshift-and-uids

viceice commented 1 year ago

Problematic tools