Add runtime UID/GID adjustment to match host workspace owner
This commit is contained in:
+4
-2
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user