Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing my approach to use VSCode Settings Sync and official extension market #148

Closed
LER0ever opened this issue Mar 8, 2019 · 5 comments
Labels
docs Documentation related

Comments

@LER0ever
Copy link

LER0ever commented Mar 8, 2019

First, thanks for this great project, this is much easier to use than Che and Theia

Two problems I've come across during my day of use are

  • Extensions are cached and installed from Coder's server, most of which for now are outdated
  • Cannot Sync settings with VSCode

My approach

So I made a Docker template to automatically configure code-server from Settings Sync Gist.

Using Docker's multi-stage build, I can directly use the actual Visual Studio Code binary to install extensions from Microsoft's server, and then later copy them to code-server. And VSCode settings are also directly fed into code-server.

extensions.json parsing and installing

Is done the UNIX way.

jq -r ".[].metadata.publisherId" extensions.json > extensions.list
while IFS='' read -r line || [[ -n "$line" ]]; do
    echo "Installing $line using VSCode";
    code --user-data-dir /root/.config/Code --install-extension $line
done < "$1" # extensions.list

For those of you who already use Settings Sync, my configuration might be handy as you only need to change the gist id to make the entire thing work.

Relevant Issues: #30 #145
My template: https://github.com/LER0ever/EvDev

Screenshot, almost the same as my VSCode:
image

@lsmoura
Copy link
Contributor

lsmoura commented Mar 10, 2019

Any chance you can share your docker template? 😊

@ezh
Copy link

ezh commented Mar 10, 2019

@LER0ever Thank you very much for information.

I updated your solution a bit. Now, everything that I need is only update extensions file and do docker build ...
https://github.com/ezh/code-server/blob/ide/Dockerfile
https://github.com/ezh/code-server/blob/ide/extensions

I get extension id directly from URL of VSCode market.
For example https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby
rebornix.Ruby is extension id.

@nhooyr
Copy link
Contributor

nhooyr commented Mar 11, 2019

Would love to see this in the https://github.com/codercom/code-server/wiki

@nhooyr nhooyr added the docs Documentation related label Mar 11, 2019
@davefinster
Copy link

I took a somewhat heavier handed approach. I build a docker image containing the real VSCode as per https://github.com/davefinster/coder/blob/master/official-vscode/Dockerfile and then build the real Coder container with https://github.com/davefinster/coder/blob/master/go/Dockerfile.

In my case I'm just installing the Go extensions.

@kylecarbs
Copy link
Member

Closing for now. sshcode supports syncing of settings and extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related
Projects
None yet
Development

No branches or pull requests

6 participants