Skip to content

Commit

Permalink
fix: save extensions in workdir
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Nov 23, 2024
1 parent 9f5ab87 commit e9b3a57
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker/vscode/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

USER ${SESSION_USER}
COPY entrypoint.sh /entrypoint.sh
WORKDIR ${WORKDIR}
ENTRYPOINT ["tini", "--", "sh", "-c"]
CMD ["/codium-server/bin/codium-server --server-base-path $RENKU_BASE_URL_PATH/ --without-connection-token --host 0.0.0.0 --port 8888"]
# We are setting this to a weird double underscore name to avoid collisions with user-set vars
ENV __WORKDIR__=${WORKDIR}
ENTRYPOINT ["tini", "--", "/bin/bash", "/entrypoint.sh"]
12 changes: 12 additions & 0 deletions docker/vscode/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
set -ex
WORKDIR=${__WORKDIR__}
mkdir -p "${WORKDIR}/.vscode/extensions"
/codium-server/bin/codium-server \
--server-base-path "$RENKU_BASE_URL_PATH/" \
--without-connection-token \
--host 0.0.0.0 \
--port 8888 \
--extensions-dir "${WORKDIR}/.vscode/extensions" \
--accept-server-license-terms \
--telemetry-level off \
--server-data-dir "${WORKDIR}/.vscode"

0 comments on commit e9b3a57

Please sign in to comment.