How to run GUI app on Docker

preview_player
Показать описание

$ sudo service docker start

$ xauth list

$ sudo docker run -i -t --net=host -e DISPLAY -v /tmp/.X11-unix ubuntu bash

Inside container:
$ apt-get install firefox
$ apt-get install xauth
$ xauth add ...
Рекомендации по теме
Комментарии
Автор

Piotrek, pomogłeś mi tak bardzo! Dzięki wielkie!!!
Peter, you helped me so much! Big thanks!!!

pawekaminski
Автор

THIS really worked! I've tried several solutions over internet, docker gui images, stackoverflow, askubuntu etc., but this video has the definitive solution for the DISPLAY error (the xauth cookie AND the --net=host). Thank you!

sonysantos
Автор

Thank you very much! This is the only thing that worked. I tried a bunch of different, convoluted ways I found on the internet and all of them were extremely complex AND failed to work. This method was a piece of cake. Thanks again Piotrek!

jasonwolosonovich
Автор

So simple yet so helpful!! you helped me alot sir.

Rami

ramiveiberman
Автор

Very good. helped me a lot. Thank you Piotrek

WaldirBorbaJunior
Автор

If you want to start the Application automatic with a Dockerfile, the system uses the Programm from the host machine!

alexofner
Автор

where did you get the cookie ? I didn't see that part ?

DDBAA
Автор

Nice !! The same docker container if I run in AWS ec2 instance and then want to access from my local machine, how can we achieve this ?

saranjeetsingh
Автор

A jak z wydajnością przy x11? Spokojnie można używać np. android studio?

unperfectcooking
Автор

at the start xauth list doesn't work for me, I don't get a cookie. instead I get "bash: xauth: command not found''

koya-lv
Автор

xauth list doesn't list anything why is that?

EightSixx
Автор

If anyone gets this error !!! [Parent][MessageChannel] Error: (msgtype=0x46001C, name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv do the


You can disable multi-process windows in Firefox by setting these prefs to false on the about:config page.


browser.tabs.remote.autostart = false
= false
You can open the about:config page: via the location/address bar. You can accept the warning and click "I'll be careful" to continue.

jamesdube
Автор

echo $DISPLAY

xauth list
xauth: file /root/.Xauthority does not exist

pawlo