Skip to content

🔧 [P0] Add non-root USER to Dockerfile #126

Closed

Description

@ajianaz

Problem

The Dockerfile has no USER directive. The container process runs as root by default.

The v0.0.5 release notes claim "Non-root user" but this was never implemented.

Security Impact

If the embedding model download or ONNX runtime has a vulnerability, it runs as root — full container compromise.

Fix

# Add after model COPY and before ENTRYPOINT
RUN addgroup --system --gid 1000 uteke && \
    adduser --system --uid 1000 --ingroup uteke --home /data uteke
USER uteke

Also ensure:

  • /data directory permissions set to uteke:uteke
  • Health check endpoint still works (port binding happens before USER switch)

Acceptance Criteria

  • Dockerfile contains USER directive with non-root user
  • Container starts and runs uteke-serve successfully as non-root
  • Health check endpoint accessible
  • Model files readable by non-root user

Effort: ~15 minutes

Activity

  1. added
    scope:infra
    scope:docker
    on Jun 2, 2026
  2. ajianaz commented on Jun 2, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in #146 — non-root USER added to Dockerfile with uteke:uteke (uid/gid 1000)

  3. added a commit that references this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:dockerscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions