117503445 / vsc-server-setup

Automatically install the latest version of VSCode Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License

中文 README


Logo

vsc-server-setup

Automatically install the latest version of VSCode Server

About The Project

VSCode Remote allows users to develop in remote servers and containers with the architecture shown in the figure below.

architecture

You need to install the latest version of VS Code Server on a remote system, and although VS Code can do this automatically, poor network conditions in China often make downloading VS Code Server fail. This project allows you to keep the server's VS Code Server up to date.

Usage

Download docker-compose.yml

version: "3.9"

services:
  vsc-server-setup:
    image: 117503445/vsc-server-setup
    container_name: vsc-server-setup
    volumes:
      - ./config/config.json:/root/config.json:ro
      - ./data:/root/data

      - ~/.ssh:/root/.ssh:ro
      
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro

Write ./config/config.json

{
    "logging_level": "INFO",
    "targets": [
        {
            "type": "ssh",
            "name": "server1",

            "host": "127.0.0.1",
            "port": 22,
            "user": "root"
        },
        {
            "type": "ssh",
            "name": "server2",

            "host": "192.168.1.1",
            "port": 22,
            "user": "root"
        }
    ]
}

Currently, only SSH method is supported

Execute docker compose up to update VSC Server

You can also run this command periodically via crontab

0 * * * * * cd ~/.docker/vsc-server-setup && docker compose up

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

Automatically install the latest version of VSCode Server

License:MIT License


Languages

Language:Python 64.2%Language:Shell 29.1%Language:Dockerfile 6.7%