RJSzynal / dockerfiles

A collection of Dockerfiles I've created
MIT License
1 stars 0 forks source link

vscodium is not showing #1

Open vinniec opened 3 years ago

vinniec commented 3 years ago

Foreword, this is my first attempt at using docker. I would like to use docker to run vscodium on alpine linux. I can safely run "docker pull rjszynal/vscodium" and then run the recommended command line. I don't get any errors but vscode doesn't appear. I also tried changing your example run command but with no better results.

docker run --rm -d -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/dri -v "${HOME}/.gtkrc:${HOME}/.gtkrc:ro" -e DISPLAY=$DISPLAY -e DISPLAY_WIDTH=1024 -e DISPLAY_HEIGHT=768 -e GDK_SCALE -e GDK_DPI_SCALE -e QT_DEVICE_PIXEL_RATIO --group-add video --group-add audio -v /etc/localtime:/etc/localtime:ro -v /etc/passwd:/etc/passwd:ro -u $(id -u):$(id -g) -v ${HOME}:${HOME} -w ${PWD} --name vscodium rjszynal/vscodium
RJSzynal commented 3 years ago

I've never run this on Alpine, I use Debian, and I've not run it in a long time, but I'd say the first things to look at are these:

All of this is based off of Jessie Frazelle's work that is detailed on her blog too. Worth reading there to really understanding what any of this is doing.

vinniec commented 3 years ago

thanks for the reply, I'll try to answer your questions in turn: 1) yes i use xorg as graphical server:

$ cat /etc/apk/world | grep xorg
xorg-server
$ type Xorg
Xorg is /usr/bin/Xorg

2) I don't know, but if I run the commands id -u and id -g from user and root and they return respectively 1000 for user and 0 for root

$ echo "$(id -u):$(id -g)"
1000:1000
# echo "$(id -u):$(id -g)"
0:0

3) I don't know, where are these "security steps" written?

Is this the blog post? https://blog.jessfraz.com/post/docker-containers-on-the-desktop/

vinniec commented 3 years ago

I asked a friend to try your image, he did it on arch and it doesn't work for him either. Apart for the typo of the space in more after the backslash of --group-add, it has the same one, the process opens and closes instantaneously without showing nothing. I, however, do not have enough experience to debug it :/

I asket to anoter friend with ubuntu 20.04 , same problem

RJSzynal commented 3 years ago

This is very much just a fun project and not a supported project. Tinkering with it and getting it working would be a great learning opportunity as it would force you to learn how the underlying operating system works. As a first docker project, it's probably a little much, certainly a more advanced level of project.

This is very much a project I tinkered with a few years ago but I don't have the time these days. Maybe it's something I'll pick up again in the future at some point though.

With the amount of applications in this repo, I couldn't even tell you if this ever worked. I seem to remember either this or vscode working at some point but then randomly closing and I never worked out the problem.

If you manage to get it working, do let me know how.

vinniec commented 3 years ago

Ok, I'm just approaching docker recently, so I don't have much skill to figure out what's not working. However, I can tell you that I have also tried vscode from jessfraz and that doesn't work either. I finally tried the most recent image I could find and it worked. But it's undocumented, it's much larger than yours and I had to use your command line to get it to start (so it's not a running command prooblem). I will try to contact him to see if he is somehow willing to pass me the Dockerfile.