b01 / dl-vscode-server

MIT License
20 stars 4 forks source link

Need to know URL for VS Code Server for Alpine Musl #5

Closed b01 closed 4 months ago

b01 commented 4 months ago

In the download-vs-code-server.sh script you will notice that you have to specify "alpine" as the platform in place of "linux" to download VS Code Server that is correct for Alpine (musl with no GNU LibC). While such a version exist currently the URL to download it is unknown. I've tried to guess, but to no avail. I know that it exist, as the VS Code source makes references to it and also you can see it get installed when you start a Dev container with Alpine and the minimum requirements:, here is a crop of the log output during the startup of such a Dev container:

Support for Alpine Linux is in preview.

[12689 ms] Start: Run in container: test -d '/root/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd'
[12690 ms]
[12690 ms]
[12690 ms] Exit code 1
[12690 ms] Start: Run in container: apk info | grep -e '^libstdc++$' || (apk update && apk add libstdc++)
[12695 ms] libstdc++
[12695 ms] WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.19/main: No such file or directory
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.19/community: No such file or directory
[12696 ms] Start: Run in container: test -d '/vscode/vscode-server/bin/linux-alpine/b58957e67ee1e712cebf466b995adf4c5307b2bd'
[12697 ms]
[12697 ms]
[12697 ms] Exit code 1
[12697 ms] Installing VS Code Server for commit b58957e67ee1e712cebf466b995adf4c5307b2bd
[12698 ms] Start: Installing VS Code Server
[12698 ms] Start: Run in container: mkdir -p /vscode/vscode-server/bin/linux-alpine/b58957e67ee1e712cebf466b995adf4c5307b2bd_1715108361602
[12699 ms]
[12699 ms]
[12729 ms] Start: Run in container: (dd iflag=fullblock bs=8192 count=7123; dd iflag=fullblock bs=3386 count=1) | tar --no-same-owner -xz -C /vscode/vscode-server/bin/linux-alpine/b58957e67ee1e712cebf466b995adf4c5307b2bd_1715108361602
[14102 ms] 7123+0 records in
7123+0 records out
58351616 bytes (55.6MB) copied, 1.371050 seconds, 40.6MB/s
[14103 ms] 1+0 records in
1+0 records out
3386 bytes (3.3KB) copied, 0.000004 seconds, 807.3MB/s
[14105 ms]
[14105 ms]
[14105 ms] Start: Run in container: mv -n /vscode/vscode-server/bin/linux-alpine/b58957e67ee1e712cebf466b995adf4c5307b2bd_1715108361602/* /vscode/vscode-server/bin/linux-alpine/b58957e67ee1e712cebf466b995adf4c5307b2bd && rmdir /vscode/vscode-server/bin/linux-alpine/b58957e67ee1e712cebf466b995adf4c5307b2bd_1715108361602
[14107 ms]
[14107 ms]
[14107 ms] Start: Run in container: mkdir -p '/root/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-alpine/b58957e67ee1e712cebf466b995adf4c5307b2bd' '/root/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd'
[14109 ms]
[14109 ms]
[14109 ms] Start: Run in container: touch '/vscode/vscode-server/bin/linux-alpine/b58957e67ee1e712cebf466b995adf4c5307b2bd' && cd '/vscode/vscode-server/bin/linux-alpine' && ls -td *[^_]????????????? | tail -n +10 | xargs rm -rf
[14111 ms]
[14111 ms]
[14111 ms] Start: Run in container: test -x '/root/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/bin/helpers/check-requirements.sh'
[14112 ms]
[14112 ms]
[14112 ms] Start: Run in container: '/root/.vscode-server/bin/b58957e67ee1e712cebf466b995adf4c5307b2bd/bin/helpers/check-requirements.sh'
[14116 ms] Warning: alpine distro detected, skipping GLIBCXX check
[14116 ms]

I'm hoping someone can volunteer the correct URL. Until I'll keep trying to hunt in down.

b01 commented 4 months ago

I noticed today when VS Code CLI to make a tunnel to an Alpine container (musl with no GNU Lib C) that it installed the server with a tar named vscode-server-linux-alpine.tar.gz So instead of replacing the platform "linux" with "alpine", I switched to replace architecture "x64" with "alpine" and was able to pull a stable release of the VS Code Server for Alpine (musl no GNU LibC). Here a crop from the logs for review:

[2024-05-08 18:14:57] info [tunnels::connections::relay_tunnel_host] Opened new client on channel 2
[2024-05-08 18:14:57] info [russh::server] wrote id
[2024-05-08 18:14:57] info [russh::server] read other id
[2024-05-08 18:14:57] info [russh::server] session is running
[2024-05-08 18:14:58] info [rpc.0] Checking /root/.vscode/cli/servers/Stable-b58957e67ee1e712cebf466b995adf4c5307b2bd/log.txt and /root/.vscode/cli/servers/Stable-b58957e67ee1e712cebf466b995adf4c5307b2bd/pid.txt for a running server...
[2024-05-08 18:14:58] info [rpc.0] Downloading Visual Studio Code server -> /tmp/.tmpgvHxG2/vscode-server-linux-alpine.tar.gz
[2024-05-08 18:15:00] info [rpc.0] Starting server...
[2024-05-08 18:15:00] info [rpc.0] Server started
[2024-05-08 18:20:15] info closing tunnel and all clients after a shutdown request
[2024-05-08 18:20:15] info Shutting down: RPC client requested shutdown
[2024-05-08 18:20:15] info [rpc.0] Disposed of connection to running server.

I'll update the script to close this issue if this works.