Skip to content

itaru2622/docker-vscode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

basic use example on linux

yourhost$ work_dir=${HOME}/yourProjectDir
yourhost$ docker run --name vscode -v ${work_dir}:/work -v /tmp/.X11-unix:/tmp/.X11-unix --rm --network host --privileged -e DISPLAY=${DISPLAY}  itaru2622/vscode:bookworm code

note: in some case, vscode failed starting. in that case, try below:

yourhost$ work_dir=${HOME}/yourProjectDir
yourhost$ docker run -it --name vscode -v ${work_dir}:/work -v /tmp/.X11-unix:/tmp/.X11-unix --rm --network host --privileged -e DISPLAY=${DISPLAY}  itaru2622/vscode:bookworm /bin/bash

container$ code

use vscode with chrome(dbus)

yourhost$ work_dir=${HOME}/yourProjectDir

# share dbus folder between host and container
yourhost$ docker run -it --name vscode -v ${work_dir}:/work \
-v /var/run/dbus:/var/run/dbus \
-v /tmp/.X11-unix:/tmp/.X11-unix --rm --network host --privileged -e DISPLAY=${DISPLAY}  itaru2622/vscode:bookworm /bin/bash

# start dbus-daemon first
container$ sudo -E /etc/init.d/dbus start

# run vscode or chrome
container$ google-chrome-stable
container$ code

About

Docker container for Microsoft vscode

Topics

Resources

Stars

Watchers

Forks