From f0a4551634c2b2de8be450243bb0108df1a47b07 Mon Sep 17 00:00:00 2001 From: DreamerC Date: Tue, 19 Jul 2022 03:39:57 +0800 Subject: [PATCH] Document : Change Docker container desktop pass-through (#2070) * Document : Change Docker container pass-through Update #1692 for Docker new security protection in 2022 . * fix Linting error * fix markdown linting * Markdown Linting : blank line Fenced code blocks should be surrounded by blank line * undo macOS config and reorganize undo macOS Part for Docker Desktop, and move to the new paragraph. * Update DOCKER_ADVANCED.md * Fix trailing spaces Co-authored-by: DidierRLopes Co-authored-by: Theodore Aptekarev --- DOCKER_ADVANCED.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/DOCKER_ADVANCED.md b/DOCKER_ADVANCED.md index dac223bee74..e3488d5e312 100644 --- a/DOCKER_ADVANCED.md +++ b/DOCKER_ADVANCED.md @@ -42,11 +42,11 @@ docker run -it --rm --env-file=path/to/setenv ghcr.io/openbb-finance/openbbtermi In order to display plots in the docker container, we can configure our XServer. +### X-Server on macOS + Users familiar with Docker and X-Server can set the `DISPLAY` variable in the file [setenv](/docker/setenv) described above. If you use this approach remember to add `:0` at the end of your inet address. E.g. `DISPLAY=192.168.1.155:0`. -### X-Server - For help setting up the X-Server, I will go through this now: #### Setting up X Quartz/X11 @@ -71,3 +71,29 @@ docker run -it --rm --env-file=path/to/setenv -e DISPLAY=$IP:0 ghcr.io/OpenBBTer ``` This container will be able to display all the same plots as the terminal interface. + +### X-Server on Linux Desktop + +X-Server is default in Linux distribution, and it's no need to install any client in Desktop. + +#### Local docker container + +We can use IPC socket to connect Desktop. + +Add this setting to your `.env` file. + +```bash +OPENBB_BACKEND=Qt5Agg +``` + +And run the following commands. + +```bash +xhost +local: +docker run -it --rm --name openbb --env-file=./.env -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix ghcr.io/openbb-finance/openbbterminal-poetry:latest +xhost -local: +``` + +If you're using remote docker host, you can connect with "ssh -X ". + +Then run the previous docker command.