[PYTHON] code-server Local environment (3) Try using VSCode Plugin

This is the third day article of Advent Calender on the 2019 code-server. This is a continuation of the second day. This time as well, I will explain what is code-server?

(1) What is code-server? (2) Create your own code-server environment with Docker (3) Try using VSCode Plugin (4) Let's prepare an MVC environment including DB etc. (1) (5) Let's prepare an MVC environment including DB etc. (2) (6) Let's prepare an MVC environment including DB etc. (3) (7) Let's prepare an MVC environment including DB etc. (4) (8) Let's prepare an MVC environment including DB etc. (5) (9) Let's prepare an MVC environment including DB etc. (6) (10) Bonus

(NEXT->) Online environment version 1st day Improve the work environment

(..) To build locally including environment such as DB (..) How to put it online? (..) How to work with the latest trendy environment such as K8S? (..) I want to modify Code-Server to make it better

For code-server, the vscode plugin is available.

You can use the vscode plugin. You will be able to easily write programs by using auxiliary functions such as autocomplete and refactoring functions.

Let's create it with python.

FROM python:3.8.0-buster

RUN apt-get update
# code-Install wget to get the server
RUN apt-get install -y wget

#Working directory/Make it works. Anywhere is fine
WORKDIR /works

# code-Get the server binary
RUN wget https://github.com/cdr/code-server/releases/download/2.1692-vsc1.39.2/code-server2.1692-vsc1.39.2-linux-x86_64.tar.gz

# code-server/Unzip under works
RUN tar -xzf code-server2.1692-vsc1.39.2-linux-x86_64.tar.gz -C ./ --strip-components 1 

WORKDIR /works/app
ENV PYTHONPATH=/works/app

#Install python plugin
RUN /works/code-server --install-extension ms-python.python
RUN /usr/local/bin/python -m pip install -U pylint --user

#The default is/works/Make it start with app.
CMD [ "/works/code-server", "--allow-http", "--auth", "none", "--port", "8443", "/works/app"]



I could have installed python on ubuntu, but I am using the official python image.

I have installed the plugin for python as RUN / works / code-server --install-extension.

The root folder is specified by specifying PYTHONPATH.

Try out

docker build -t cs03 .
docker run -v "$PWD:/works/app" -p "8443:8443" -it cs03  

Open a browser and write something

Screen Shot 2019-12-03 at 5.39.02.png

Oh, the complement is working !!

next time

Let's distribute the created Image. Once created, the Image can be moved in almost the same state.

PS

Source

https://github.com/kyorohiro/advent-2019-code-server

Recommended Posts

code-server Local environment (3) Try using VSCode Plugin
Try using Tkinter
Try using docker-py
Try using cookiecutter
Try using PDFMiner
code-server online environment (1)
Try using geopandas
Try using conda virtual environment with Jupyter Notebook
Try using Selenium
Try using scipy
Try using pandas.DataFrame
Try using tensorflow ① Build python environment and introduce tensorflow
Try using django-swiftbrowser
Try using matplotlib
Try using tf.metrics
Try using PyODE
Using Flask with Nginx + gunicorn configuration [Local environment]
code-server Local environment (9) Let's prepare an MVC environment including DB (6)
code-server Local environment (4) Let's prepare an MVC environment including DB (1)
code-server Local environment (5) Let's prepare an MVC environment including DB (2)
QGIS3 Python plugin development environment construction with VSCode (macOS)
Try using virtualenv (virtualenvwrapper)
[Azure] Try using Azure Functions
Try using virtualenv now
Try using W & B
Try using Django templates.html
[Kaggle] Try using LGBM
Try using Python's feedparser.
Try using Python's Tkinter
Try using Tweepy [Python2.7]
Try using Pytorch's collate_fn
Test discovery fails when using tensorflow in vscode + pytest environment