Skip to content

Pin the @osaas/cli version in the entrypoint and run the image as a non-root user #33

Closed as not planned

Description

@birme

Part of Eyevinn/osaas-app#7052.

Public repository: keep PR text and comments neutral. Context lives in the private parent.

Directions

  1. scripts/docker-entrypoint.sh (~232): same pinning as web-runner (one OSAAS_CLI_VERSION, no @latest).
  2. Run the container as a non-root user.

Acceptance criteria

  1. No @osaas/cli@latest remains; the version is defined in one place.
  2. Existing tests and the image build pass.
  3. The image runs as a non-root user and the documented behaviour (pip installs, writes to the app directory) still works. If it cannot, post ## Spec Invalid naming the behaviour that blocks it and leave this ticket open; the PR for item 1 then uses Part of #<this ticket's number> without a closing keyword.

PR closing keywords

The PR body uses Part of #<this ticket's number> (no closing keyword) while an acceptance criterion is open; the final PR carries Closes #<this ticket's number>. No closing keyword for Eyevinn/osaas-app#7052.

What a human does next

Nothing.

Activity

  1. self-assigned this
    on Nov 3, 2026
  2. eyevinn-developer commented on Nov 3, 2026

    @eyevinn-developer
    Contributor

    Spec Invalid

    Acceptance criterion 3 (run as a non-root user with pip installs and app-directory writes still working) could not be established, so the first PR covers item 1 only (version pinning) and uses Part of #33. This ticket stays open.

    What could not be verified, and why it matters here:

    • The entrypoint runs pip install into the system Python (pip install --no-cache-dir ... for pyproject, requirements, setup.py and requirements-dev) and the image installs gradio system-wide at build time. As a non-root user the system site-packages are not writable, so installs would silently switch to a per-user location, which needs a writable HOME and changes where packages (and their console scripts) land on PATH. That needs a deliberate choice (a venv owned by the runtime user, or PIP_USER/PYTHONUSERBASE plus PATH) and a real run to confirm.
    • /usercontent is a declared VOLUME that the entrypoint clears (rm -rf /usercontent/*) and clones into, and it also writes .commit-info.json there. Its ownership at runtime depends on how the platform mounts the volume, which cannot be settled by reading the Dockerfile.
    • Docker is not available in the environment that produced this change, so neither the build nor a container run could be performed.

    Next step: decide the pip install location for the non-root user and verify with a container build and run on a machine with docker (pip install from requirements.txt, clone into /usercontent, setup.sh, app start on port 8080).

  3. birme commented on Nov 3, 2026

    @birme
    ContributorAuthor

    Moved back to Backlog by daily-review (Step 6c): the only merged PR (#34, Part of #33) covers criterion 1 (pin @osaas/cli). Criterion 3 (run as non-root, needs a decision on where pip installs go) is not done and nothing else owns it; criterion 2 (image build) was not confirmed. Needs re-spec by daily-triage.

  4. birme commented on Nov 4, 2026

    @birme
    ContributorAuthor

    Decision (birme, 2026-11-04): the runtime user of the image is not changed at this time.

    • Acceptance criterion 1 (the pinned @osaas/cli version, defined in one place) shipped in Pin @osaas/cli version in the entrypoint #34.
    • Acceptance criterion 3 (run as a non-root user) is declined. The image continues to run as root, and the pull request for it (Run the image as a non-root user #35) is closed without merging.
    • No further work is planned on this ticket, so it is closed as not planned. A new ticket can reopen the question if the requirement comes back.

    Cause category: product decision.
    Prevent next time: none.
    Owner of that change: birme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai-devopsSelected for AI agent work

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions