Closed mantrakp04 closed 6 months ago
root@096f43737635:/workspace# code tunnel --accept-server-license-terms --disable-telemetry --name test --cli-data-dir /workspace/.vscode-server/cli user login --provider github --log trace --verbose
[2024-03-16 20:10:27] debug [reqwest::connect] starting new connection: https://github.com/
To grant access to the server, please log into https://github.com/login/device and use code ****-****
[2024-03-16 20:10:33] trace refresh poll failed, retrying: Error getting authorization: authorization_pending The authorization request is still pending.
[2024-03-16 20:10:38] debug Using file keychain storage due to: error reading keyring: Platform secure storage failure: no secret service provider or dbus session found
root@096f43737635:/workspace#
Weird fix but
init_script
:#!/bin/bash
code tunnel --accept-server-license-terms --disable-telemetry --name testdev --cli-data-dir /workspace/.vscode-server/cli &
# sleep till infinity helps, found it when i was tinkering around with xdotool
while true; do
sleep 1000
done
Dockefile
snippet:WORKDIR /workspace
RUN mkdir -p /workspace/.vscode-server/cli
ADD scripts/utils/ai-api/init_script.sh /init_script.sh
RUN chmod +x /init_script.sh
CMD ["/bin/bash", "-c", "bash /init_script.sh"]
code tunnel user login
just logs in. It doesn't start the server. Exiting after doing so is expected behavior; run just code tunnel
if you want a persistent tunnel.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
Dockerfile
:ENV DEBIAN_FRONTEND=noninteractive
Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ git \ libgl1-mesa-glx \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ python3 \ python3-pip \ python3-venv \ wget \ nano \ curl \ && rm -rf /var/lib/apt/lists/*
Setup Git
RUN git config --global credential.helper store && \ git config --global user.email "..." && \ git config --global user.name "..."
Install VS Code server
RUN curl -sL "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64" --output /tmp/vscode-cli.tar.gz && \ tar -xf /tmp/vscode-cli.tar.gz -C /tmp && \ mv /tmp/code /usr/local/bin/code && \ rm -rf /tmp/vscode-cli.tar.gz /tmp/VSCode-linux-x64
Start the code tunnel
WORKDIR /workspace RUN mkdir -p /workspace/.vscode-server/cli CMD ["/bin/bash", "-c", "code tunnel --accept-server-license-terms --disable-telemetry --name dev --cli-data-dir /workspace/.vscode-server/cli user login --provider github"]