Skip to content

Allow running as arbitrary UID for unprivileged Container Environments (OpenShift) #928

@rezemble

Description

@rezemble

Per default, this image cannot run with arbitrary UIDs, since permissions to /etc/icingadb are granted only to the user and not the group (see OpenShift Container Platform-specific guidelines - containers run with an arbitrary UID and GID=0)

This can be mitigated by chowning /etc/icingadb to root and granting group the same permissions as user.

for example by modifying

COPY --from=base --chown=icingadb:icingadb /empty /etc/icingadb

to instead read:

COPY --from=base --chown=icingadb:root /empty /etc/icingadb
RUN --mount=from=busybox:uclibc,dst=/usr ["/usr/bin/chmod", "-R", "g=u", "/etc/icingadb"]

(See this gist regarding busybox mount in scratch)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/containerEverything Container, Containerfile or Docker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions