Add runtime UID/GID adjustment to match host workspace owner

This commit is contained in:
2026-04-10 13:57:45 +02:00
parent 94b64db751
commit 7685facb37
5 changed files with 137 additions and 79 deletions
+4 -2
View File
@@ -31,6 +31,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
less \
vim-tiny \
sudo \
gosu \
locales \
procps \
unzip \
@@ -103,9 +104,10 @@ RUN mkdir -p /workspace \
# ── Entrypoint ────────────────────────────────────────────────────────
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
COPY entrypoint-user.sh /usr/local/bin/entrypoint-user.sh
RUN chmod +x /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint-user.sh
USER ${USER_NAME}
# Start as root — entrypoint adjusts UID/GID then drops to developer
WORKDIR /workspace
ENTRYPOINT ["entrypoint.sh"]