Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(gateway-container): stamp the version label and pin the service uid (#5489)

Ezra Ellette1cfd7e321c77
diff --git a/.github/workflows/release-gateway-container.yml b/.github/workflows/release-gateway-container.yml
index 2d9c59520..11c4eab17 100644
--- a/.github/workflows/release-gateway-container.yml
+++ b/.github/workflows/release-gateway-container.yml
@@ -89,8 +89,14 @@ jobs:
# Builds the `runtime` stage (gateway binary only — no seeder, no policy
# fixture) and fails the job if the result carries anything credential-
# shaped. Nothing is pushed until this passes.
+ # VERSION stamps org.opencontainers.image.version. Without it the label
+ # keeps the Dockerfile's `dev` default, which is what 0.0.1 shipped with —
+ # a published image that cannot say which release it is.
- name: Build and scan for secrets
- run: TAG="$IMAGE:${{ steps.version.outputs.version }}" ./scripts/build-gateway-container.sh
+ run: |
+ TAG="$IMAGE:${{ steps.version.outputs.version }}" \
+ VERSION="${{ steps.version.outputs.version }}" \
+ ./scripts/build-gateway-container.sh
- name: Push
id: push
diff --git a/crates/screenpipe-gateway/Dockerfile b/crates/screenpipe-gateway/Dockerfile
index 0987dc93e..396f152b0 100644
--- a/crates/screenpipe-gateway/Dockerfile
+++ b/crates/screenpipe-gateway/Dockerfile
@@ -25,7 +25,15 @@ FROM debian:bookworm-slim AS base
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/* \
- && useradd --system --no-create-home screenpipe \
+ # uid/gid PINNED, not left to useradd's "next free system id". The
+ # customer-facing Fargate template (website
+ # public/enterprise/aws-gateway-fargate.yaml) configures an EFS access point
+ # with PosixUser 999:999 to own /data. An access point's PosixUser overrides
+ # whatever uid the container presents, so a renumber here would not break
+ # the mount — but it would silently desync the two, and the next reader of
+ # either file would have no way to tell 999 was ever deliberate.
+ && groupadd --system --gid 999 screenpipe \
+ && useradd --system --no-create-home --uid 999 --gid 999 screenpipe \
# Default data dir, owned by the service user so a fresh named volume
# (which inherits the image directory's ownership) is writable. /policy is
# the same story for the e2e's fixture-signed policy (SCR-288): a named