From 3d85a0595cc760bdc9846f4e5459dbf826167a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cade=20=F0=9F=90=80?= Date: Fri, 5 Dec 2025 00:29:23 -0600 Subject: [PATCH] fix: add support for anyuid to Dockerfile (#658) * fix: add support for anyuid to Dockerfile * changelog --------- Co-authored-by: Cade Schlaefli Co-authored-by: Brendan Kellam --- CHANGELOG.md | 3 +++ Dockerfile | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28f1e517..a2f126fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed review agent so that it works with GHES instances [#611](https://github.com/sourcebot-dev/sourcebot/pull/611) +### Added +- Added support for arbitrary user IDs required for OpenShift. [#658](https://github.com/sourcebot-dev/sourcebot/pull/658) + ## [4.10.2] - 2025-12-04 ### Fixed diff --git a/Dockerfile b/Dockerfile index 9a75ade0..7af3dfa1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -195,6 +195,7 @@ RUN addgroup -g $GID sourcebot && \ adduser -D -u $UID -h /app -S sourcebot && \ adduser sourcebot postgres && \ adduser sourcebot redis && \ + chown -R sourcebot /app && \ adduser sourcebot node && \ mkdir /var/log/sourcebot && \ chown sourcebot /var/log/sourcebot @@ -244,7 +245,12 @@ RUN mkdir -p /run/postgresql && \ chown -R postgres:postgres /run/postgresql && \ chmod 775 /run/postgresql -RUN chown -R sourcebot:sourcebot /data +# Make app directory accessible to both root and sourcebot user +RUN chown -R sourcebot /app \ + && chgrp -R 0 /app \ + && chmod -R g=u /app +# Make data directory accessible to both root and sourcebot user +RUN chown -R sourcebot /data COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY prefix-output.sh ./prefix-output.sh