Sign inSign up

beneventsur/visual-studio-code

By beneventsur

Updated almost 7 years ago

Ubuntu 16.04 with Visual Studio Code (VSCode) via browser

Image
7

100K+

beneventsur/visual-studio-code repository overview

Ubuntu 16.04 with Visual Studio Code via browser

Visual Studio Code is a distribution of the Code - OSS repository with Microsoft specific customizations released under a traditional Microsoft product license. Visual Studio Code combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools. Visual Studio Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on Visual Studio Code's website. To get the latest releases every day, install the Insiders build.

Run command:

docker container run -it -p 6080:6080 -p 5901:5901 -e PASSWORD=123456 -e WIDTH=1920 -e HEIGHT=1080 beneventsur/visual-studio-code:latest
  • For a better experience change the WIDTH and HEIGHT variables according to your screen resolution and set another PASSWORD.
  • Port 5901 is used for VNC viewer access.
  • Port 6080 is used for HTTP access (thanks to noVNC).
See also a better new solution using beneventsur/xubuntu image:
docker container run -id -p 6080:6080 -p 5901:5901 -e PASSWORD=123456 -e WIDTH=1920 -e HEIGHT=1080 beneventsur/xubuntu:vscode-1.44.2

After the container is running you can navigate to http://localhost:6080/vnc.html and get access to Visual Studio Code on your favorite browser.

Dockerfile:

FROM ubuntu:16.04

# Update apt and install required packages.
RUN apt-get update; \
    apt-get -y upgrade; \
    apt-get install -y vnc4server git python vim wmctrl curl apt-transport-https libasound2

# Install VSCode.
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg; \
    install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/; \
    sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'; \
    apt-get update; \
    apt-get install -y code; \
    sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1

# Set default environments.
ENV PASSWORD=123456 WIDTH=1920 HEIGHT=1080

# Copy required files.
COPY ./noVNC/ /noVNC/
COPY ./startup.sh /startup.sh

# Change access permissions to noVNC project.
RUN chmod 777 /startup.sh; \
    chmod 777 -R /noVNC

# Start with script that runs VSCode, VNC server and noVNC.
ENTRYPOINT ["/startup.sh"]
Version of VSCode with NodeJS is also avilable

Run command:

docker container run -it -p 6080:6080 -p 5901:5901 -e PASSWORD=123456 -e WIDTH=1920 -e HEIGHT=1080 beneventsur/visual-studio-code:1.34.0-nodejs-v10.16.0

Dockerfile:

...
# Install NodeJS using make.
RUN wget https://nodejs.org/dist/v10.16.0/node-v10.16.0.tar.gz; \
    tar -xzvf node-v10.16.0.tar.gz; \
    cd node-v10.16.0; \
    ./configure; \
    make; \
    make install; \
    rm ../node-v10.16.0.tar.gz;
...

Tag summary

Content type

Image

Digest

Size

295.5 MB

Last updated

almost 7 years ago

docker pull beneventsur/visual-studio-code