This project is a dockerfile source for the image that intergates vscode server, massCode and its extension for vscode(massCode Assistant). Taking the advantage of massCode, the image can be deployed as a web IDE that can use customed code snippets.
flowchart BT
subgraph Image
subgraph IDE
MassCodePlugin[massCode Assistant]
VScode
end
massCode-->MassCodePlugin[massCode Assistant]
CodeSnippets((Code Snippets))-->massCode
end
It is useful if you are a code snippet provider and you want to let your users code with web IDE. Or you get used to code in self-hosted web IDE on your cloud server and want to use managed code snippets. What you need to do is managing snippets with massCode.
As the image built with the Dockerfile doesn't contain any code, you should take the image as base image and prepare
code snippets with massCode in your image building machine. Copy the massCode folder (the folder is /home/{your_name}/massCode
by default) to this project directory and your dockerfile may looks like:
FROM dxsooo/code-server-masscode:1.0
COPY massCode /root/massCode
Or just add the COPY command into the Dockerfile and build your own image. You had better to do more such as adding more extensions to make the IDE better for development.
Deploy with:
# replace the image with your own and mount your code path
docker run --name code-server -p8080:8080 -v{your_code_path}:/home/coder/projects -d dxsooo/code-server-masscode:1.0
And the web IDE would serve in: http://localhost:8080 . See https://github.com/cdr/code-server for more docs.
Maybe there is another way to do this, such as following snippet guide from vscode, pack the snippets to an extension and release it or pack it into web IDE image. But this would take cost to edit snippet jsons or migrate from massCode(or some other snippet management tools) to align to vscode snippets rules.