Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.06 KB

README.md

File metadata and controls

32 lines (24 loc) · 1.06 KB

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