From 9357f8e4f92dcc861cd7c44a9deb44925b7ff55b Mon Sep 17 00:00:00 2001 From: Gavin Ray Date: Thu, 5 Feb 2026 09:13:40 -0500 Subject: [PATCH 1/2] Match UID for hasura in Dockerfile and connector-definition Dockerfile --- Dockerfile | 4 ++-- connector-definition/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6432e55..8c7391b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,8 @@ RUN echo ${CONNECTOR_VERSION} > /scripts/CONNECTOR_VERSION COPY /functions /functions RUN /scripts/package-restore.sh -# Create non-root user, let useradd pick a unique UID -RUN useradd -m -s /bin/bash hasura \ +# Explicitly set UID/GID to match the cache mount used in ./connector-definition/Dockerfile +RUN useradd -m -s /bin/bash -u 1001 -g 1001 hasura \ && chown -R hasura:hasura /scripts /functions USER hasura diff --git a/connector-definition/Dockerfile b/connector-definition/Dockerfile index 4501b93..af72fb3 100644 --- a/connector-definition/Dockerfile +++ b/connector-definition/Dockerfile @@ -3,7 +3,7 @@ FROM ghcr.io/hasura/ndc-nodejs-lambda:v{{VERSION}} COPY --chown=hasura:hasura package-lock.json package.json /functions/ WORKDIR /functions -RUN --mount=type=cache,target=/home/hasura/.npm,uid=1000,gid=1000 \ +RUN --mount=type=cache,target=/home/hasura/.npm,uid=1001,gid=1001 \ npm ci COPY --chown=hasura:hasura ./ /functions From 39650b37dfbcadda6768e76174e7e256447a964f Mon Sep 17 00:00:00 2001 From: Gavin Ray Date: Thu, 5 Feb 2026 09:26:27 -0500 Subject: [PATCH 2/2] Dockefile update --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8c7391b..facd28d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,8 @@ COPY /functions /functions RUN /scripts/package-restore.sh # Explicitly set UID/GID to match the cache mount used in ./connector-definition/Dockerfile -RUN useradd -m -s /bin/bash -u 1001 -g 1001 hasura \ +RUN groupadd -g 1001 hasura \ + && useradd -m -s /bin/bash -u 1001 -g hasura hasura \ && chown -R hasura:hasura /scripts /functions USER hasura