docker安装vscode-web.md 2.8 KB


title: Docker安装vscode-web tags: [] id: '2163' categories:

  • - uncategorized date: 2023-03-13 10:53:15 ---

安装vscode-web

version: "2.1"
services:
  code-server:
    image: linuxserver/code-server:latest
    container_name: code-server
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Shanghai
      - PASSWORD=password
      - SUDO_PASSWORD=password
      - PROXY_DOMAIN=code-server.my.domain #optional
      - DEFAULT_WORKSPACE=/config/workspace #optional
    volumes:
      - ./config:/config
    ports:
      - 2441:8443
    restart: unless-stopped
  • mkdir -p ~/app/vscode && cd ~/app/vscode && nano docker-compose.yml

  • sudo docker-compose up -d && sudo docker-compose logs

vscode-web配置代理和中文

  • 打开Visual Studio Code,点击Manage,在列表中选择Settings

  • 在弹出的搜索框中输入"proxy",即可看到代理的配置项"Http:Proxy"

  • 宿主机获取docker0的ip: ip address grep docker0

  • 然后docker内设置代理 http://docker0的ip:port

  • 拓展内搜索zh-cn,安装中文界面拓展

vscode-web安装conda

conda安装nodejs

vscode-web使用git

  • npm create astro@latest

  • git config --global user.email "youremail"

  • git config --global user.name "yourname"

  • git branch -M main && git add . && git commit -m 'Initial commit'

  • git remote add origin https://github.com/Limour-dev/chatGPT.git

  • git push --set-upstream origin main --force # Creating a personal access token

  • git config --global credential.helper cache

  • git push

hello world

---
const search = Astro.url.searchParams.get('search')!  '';
---
<h1>{search}</h1>