Last active
September 25, 2025 10:23
-
-
Save progrium/76fac3c76f12e0875469629ec703aab9 to your computer and use it in GitHub Desktop.
Minimal VSCode for Web deployment. This includes a minimal Dockerfile to build VSCode and then an HTML file to run it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM node:22-alpine | |
| ARG VSCODE_VERSION=1.103.2 | |
| RUN apk add -u krb5-dev libx11-dev libxkbfile-dev libsecret-dev git build-base python3 | |
| RUN git clone --depth 1 https://github.com/microsoft/vscode.git -b $VSCODE_VERSION | |
| WORKDIR /vscode | |
| RUN npm i | |
| RUN npm run gulp vscode-web-min |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <link rel="stylesheet" href="./vscode/out/vs/workbench/workbench.web.main.internal.css" /> | |
| </head> | |
| <body style="margin:0;overflow:hidden;"> | |
| <script> | |
| const baseUrl = new URL('/vscode', window.location.origin).toString(); | |
| globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/'; | |
| </script> | |
| <script src="./vscode/out/nls.messages.js"></script> | |
| <script type="module"> | |
| import { create } from './vscode/out/vs/workbench/workbench.web.main.internal.js'; | |
| create(document.body, { | |
| "configurationDefaults": { | |
| "window.commandCenter": false, | |
| "workbench.secondarySideBar.defaultVisibility": "hidden", | |
| "workbench.layoutControl.enabled": false, | |
| "workbench.startupEditor": "none", | |
| "workbench.tips.enabled": false, | |
| "workbench.welcomePage.walkthroughs.openOnInstall": false | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DOCKER_CMD ?= $(shell command -v podman || command -v docker) | |
| serve: vscode | |
| python3 -m http.server 8000 | |
| .PHONY: serve | |
| vscode: | |
| $(DOCKER_CMD) build -t vscode-web . | |
| $(DOCKER_CMD) create --name vscode-web vscode-web | |
| $(DOCKER_CMD) cp vscode-web:/vscode-web ./vscode | |
| $(DOCKER_CMD) rm -f vscode-web |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment