diff --git a/universal/.codesandbox/tasks.json b/universal/.codesandbox/tasks.json index 56f17e6e9..e13e53070 100644 --- a/universal/.codesandbox/tasks.json +++ b/universal/.codesandbox/tasks.json @@ -24,6 +24,13 @@ "resume": false } }, + "ttyd": { + "name": "start web terminal (ttyd)", + "command": "/usr/local/bin/ttyd -p 3010 bash", + "runAtStart": true, + "preview": { "port": 3010 }, + "restartOn": { "clone": false, "resume": false } + }, "code-server": { "name": "start code-server", "command": "code-server --bind-addr 0.0.0.0:8080 --auth none /project/workspace", diff --git a/universal/.devcontainer/Dockerfile b/universal/.devcontainer/Dockerfile index 8536cc736..1290ecd75 100644 --- a/universal/.devcontainer/Dockerfile +++ b/universal/.devcontainer/Dockerfile @@ -52,6 +52,11 @@ RUN apt update && \ # Install code-server RUN curl -fsSL https://code-server.dev/install.sh | sh +# Install ttyd (web terminal) - V1: linux/amd64 only +# TODO: Add ARM64 support (alternate binary URL/detection) +RUN curl -fsSL https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 -o /usr/local/bin/ttyd \ + && chmod +x /usr/local/bin/ttyd + # The project will be mounted in /workspace by default # Every new shell will open inside the built container