Skip to content

Commit 3d85a05

Browse files
CschlaefliCade Schlaeflibrendan-kellam
authored
fix: add support for anyuid to Dockerfile (#658)
* fix: add support for anyuid to Dockerfile * changelog --------- Co-authored-by: Cade Schlaefli <cade.schlaefli@mouser.com> Co-authored-by: Brendan Kellam <bshizzle1234@gmail.com>
1 parent 84cf524 commit 3d85a05

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111
- Fixed review agent so that it works with GHES instances [#611](https://github.com/sourcebot-dev/sourcebot/pull/611)
1212

13+
### Added
14+
- Added support for arbitrary user IDs required for OpenShift. [#658](https://github.com/sourcebot-dev/sourcebot/pull/658)
15+
1316
## [4.10.2] - 2025-12-04
1417

1518
### Fixed

Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ RUN addgroup -g $GID sourcebot && \
195195
adduser -D -u $UID -h /app -S sourcebot && \
196196
adduser sourcebot postgres && \
197197
adduser sourcebot redis && \
198+
chown -R sourcebot /app && \
198199
adduser sourcebot node && \
199200
mkdir /var/log/sourcebot && \
200201
chown sourcebot /var/log/sourcebot
@@ -244,7 +245,12 @@ RUN mkdir -p /run/postgresql && \
244245
chown -R postgres:postgres /run/postgresql && \
245246
chmod 775 /run/postgresql
246247

247-
RUN chown -R sourcebot:sourcebot /data
248+
# Make app directory accessible to both root and sourcebot user
249+
RUN chown -R sourcebot /app \
250+
&& chgrp -R 0 /app \
251+
&& chmod -R g=u /app
252+
# Make data directory accessible to both root and sourcebot user
253+
RUN chown -R sourcebot /data
248254

249255
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
250256
COPY prefix-output.sh ./prefix-output.sh

0 commit comments

Comments
 (0)