-
I've been reading about distroless and the use of the Since homebox needs persistent storage, recommended in the homebox docs as a volume mapping to the Wouldn't this mean that all of the files on the host system for any docker containers using I ask because I'm used to how it's done, for example, in linuxserver.io docker images where you use a distinct UID on the host for each container so that each containers volume mapped files on the host are owned by a user dedicated to that container. Is there a way in This may be something @Sudneo would have some insight on. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is not yet implemented, see for tracking |
Beta Was this translation helpful? Give feedback.
-
Hello everyone. I think this is only partially a problem, I will elaborate my perspective (never been a big fan of linuxserver images!), but of course different people have different preferences! First of all, it is absolutely correct: if you run multiple distroless images with default UID, the underlying data would be owned by the same UID outside the containers, which means that in case of an escape, an attacker would be able to compromise data for multiple applications. Moreover, I believe both $ mkdir /tmp/test && chown 9999:9999 /tmp/test
$ docker run -u 9999:9999 -v /tmp/test:/data ghcr.io/hay-kot/homebox:latest-rootless
$ ls /tmp/test
.rw-r--r-- 193k 9999 14 Feb 22:05 homebox.db In Kubernetes the same can be achieved using the I believe this last point might address your question:
|
Beta Was this translation helpful? Give feedback.
-
@Sudneo Excellent, yes, that's exactly what I was looking for. Looking in the The linuxserver.io approach to enabling configuration of the UID/GID comes from before Docker Engine 1.7 back in 2015. I think that's a fine solution, I'll do that. |
Beta Was this translation helpful? Give feedback.
This is not yet implemented, see for tracking