Skip to content

Support declarative ownership for bind-mounted host directories #141

Description

@vishr

Problem

Services running as non-root users may require a bind-mounted host directory with specific ownership and permissions. Docker Compose creates a missing bind source automatically, but it is typically owned by root. For example, Qdrant runs as UID/GID 1000 and could not write to /data/qdrant until the application bootstrap script explicitly ran install, chown, and chmod.

This makes each consuming repository duplicate host-provisioning logic and creates an easy-to-miss deployment failure.

Proposed behavior

Allow a bind mount or service volume declaration to specify host-path provisioning metadata, for example:

host_path: /data/qdrant
uid: 1000
gid: 1000
mode: "0750"

During ob bootstrap, Onebox would idempotently:

  1. Create the exact declared directory when absent.
  2. Reconcile its owner, group, and mode.
  3. Refuse unsafe or overly broad paths.
  4. Report the reconciliation in bootstrap output.

Deployment should continue treating this as host bootstrap state rather than silently mutating host paths during every application rollout.

Acceptance criteria

  • Numeric UID/GID values work even when no matching host account exists.
  • Re-running bootstrap is idempotent.
  • Existing correctly configured directories are left unchanged.
  • Unsafe paths such as / and unresolved variables are rejected.
  • The behavior is covered by bootstrap tests and documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions