labstack / labstack/onebox

Support declarative ownership for bind-mounted host directories

Open
#141 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
3
Forks
0
Avg merge
2h 40m
Merged PRs (30d)
63

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the bind-mount and service-volume handling reached by ob bootstrap, then inspect the existing bootstrap tests. Done means numeric ownership and mode metadata are reconciled idempotently, unsafe paths are rejected, reconciliation is reported, and the behavior is covered by bootstrap tests and documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.