From 1b8616e7f93ee7d10723d8fc2ef0c8854fd4f331 Mon Sep 17 00:00:00 2001 From: Carlos Date: Mon, 24 Apr 2023 15:58:09 +0200 Subject: [PATCH] Add X11 support for docker to display charts (#4447) * Add X11 support for docker to display charts * Update installation docs for docker --------- Co-authored-by: Henrique Joaquim Co-authored-by: Theodore Aptekarev --- build/docker/docker-compose.x11.yaml | 6 ++++++ website/content/terminal/installation/docker.md | 17 +++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 build/docker/docker-compose.x11.yaml diff --git a/build/docker/docker-compose.x11.yaml b/build/docker/docker-compose.x11.yaml new file mode 100644 index 00000000000..a10f5594d5a --- /dev/null +++ b/build/docker/docker-compose.x11.yaml @@ -0,0 +1,6 @@ +services: + openbb: + environment: + DISPLAY: ${DISPLAY} + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix diff --git a/website/content/terminal/installation/docker.md b/website/content/terminal/installation/docker.md index 076d2067b39..67a7eddc62c 100644 --- a/website/content/terminal/installation/docker.md +++ b/website/content/terminal/installation/docker.md @@ -193,14 +193,14 @@ Start Docker, this is how the right output looks like: ```console docker info Client: -Context: default -Debug Mode: false + Context: desktop-linux + Debug Mode: false Server: -Containers: 14 -Running: 2 -Paused: 1 -Stopped: 10 + Containers: 14 + Running: 2 + Paused: 1 + Stopped: 10 ``` **Pull and run the container** @@ -209,11 +209,12 @@ Execute these commands: ```console curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.yaml +curl -o docker-compose.x11.yaml https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.x11.yaml -xhost +local: -docker compose run openbb +docker compose -f docker-compose.yaml -f docker-compose.x11.yaml run openbb ``` Note: if you're using remote docker host, you can connect with `ssh -X `. +