Code-server set up on the server

Recently the concept of cloud editor of the fire. But in fact this area a few years ago has a lot of useful products, such as Cloud9 (acquired by Tencent cloud), coding.net and JSbin. While easy to use, but now they are beginning to charge. Just happen to have a server on a plan to build their own. Search on github in case there is something like that can really toss down. This is code-server.
It is able to take a vscode in remote cloud server editor.
It can be set up with a docker which is really good enough.
After testing, the minimum run configuration requirements are as follows:

  • Dual-core CPU
  • 1G Memory
  • 5G hard disk
  • 2Mbps bandwidth
    (less than the required can run, but will be very card run with a single-core CPU, often disconnected.)
    Note:
    be set up to follow the tutorial Readme provided encountered creation / Backups / directory failed Happening.
    So with wrote a docker-compose complete script to create a directory before starting image.
    Big Box   building code-server on the server >
            
            
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
            
            
    version: "2.2"
    services:
    vscode:
    image: codercom/code-server
    entrypoint: sh -c "mkdir -p /root/.local/share/code-server/Backups/ && touch /root/.local/share/code-server/Backups/workspaces.json && code-server --allow-http"
    expose:
    - 8443
    restart: always
    ports:
    - "8443:8443"
    cpu_percent: 50
    cpus: 0.5

Guess you like

Origin www.cnblogs.com/sanxiandoupi/p/11713142.html