Commit
•
6151844
1
Parent(s):
d887ff2
VSCode saves things to `/data` when it exists (#3)
Browse files- VSCode saves things to `/data` when it exists (e32587604e7ac46f1251aee4325ecd7e39351d1b)
- Update start_server.sh (237eb1b5c587085665e76586e2d67b017f35de7e)
- Update Dockerfile (653671ee70e6f17a0a157acee3bdd815f313cb9e)
Co-authored-by: Apolinário from multimodal AI art <[email protected]>
- Dockerfile +2 -0
- start_server.sh +6 -2
Dockerfile
CHANGED
@@ -104,6 +104,8 @@ RUN --mount=target=/root/packages.txt,source=packages.txt \
|
|
104 |
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
105 |
bash /root/on_startup.sh
|
106 |
|
|
|
|
|
107 |
#######################################
|
108 |
# End root user section
|
109 |
#######################################
|
|
|
104 |
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
105 |
bash /root/on_startup.sh
|
106 |
|
107 |
+
RUN mkdir /data && chown user:user /data
|
108 |
+
|
109 |
#######################################
|
110 |
# End root user section
|
111 |
#######################################
|
start_server.sh
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
# Default workspace directory
|
4 |
+
WORKSPACE_DIR="/data"
|
5 |
|
6 |
+
echo "Starting VSCode Server on $WORKDIR_PATH..."
|
7 |
+
|
8 |
+
# Use the determined directory as the base path for the VS Code server
|
9 |
+
exec /app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 7860 --without-connection-token "${@}" --extensions-dir "$WORKDIR_PATH/.vscode-server/extensions" --user-data-dir "$WORKDIR_PATH/.vscode-server/data" --
|