summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChavithra PARANA <chavithra@gmail.com>2022-12-03 23:47:29 +0100
committerChavithra PARANA <chavithra@gmail.com>2022-12-03 23:47:29 +0100
commit1e4b482e9d5a1e37786fd19f1a5e610b858461fe (patch)
tree47eab3d39fdf495b7fc0b6d5f3332f020eb84da3
parent01aaf2e2f77532842b7e1ae6f950b745ad423673 (diff)
Docker: update documentation
-rw-r--r--website/content/terminal/quickstart/installation.md164
1 files changed, 65 insertions, 99 deletions
diff --git a/website/content/terminal/quickstart/installation.md b/website/content/terminal/quickstart/installation.md
index 5bbc511cef6..a1f6c54c88d 100644
--- a/website/content/terminal/quickstart/installation.md
+++ b/website/content/terminal/quickstart/installation.md
@@ -84,35 +84,38 @@ Right-Click the app and select <code>Open</code>. You will see a message saying
</TabItem>
<TabItem value="docker" label="Docker">
<p>Install with Docker</p>
- Here are the steps to get OpenBBTerminal using the Docker containers that we provide:
-1. Installing `Docker` and `Docker Compose`
-2. Pulling and running `OpenBBTerminal Docker Container`
-3. Configuring your X-server to show plots
+Here we will detail how to run OpenBB Terminal Docker image.
-Each of this steps need to be followed to have a working version of OpenBBTerminal.
+Please check the section matching to your OS.
-We will detail these steps in the rest of this document.
+## 1. Windows
-## 1. Installing `Docker` and `Docker Compose`
+### 1.1. Install Docker Desktop
-**INSTALL DOCKER**
+You can find `Docker Desktop` for Windows here: [Download Docker Desktop](https://www.docker.com/products/docker-desktop)
-Installing Docker Desktop is an alternative way and has a `Graphical User Interface` built in with `Docker Compose`.
+### 1.2. Start Docker
-You can find `Docker Desktop` installation file for your `OS` here: [Download Docker Desktop](https://www.docker.com/products/docker-desktop)
+Execute the following command:
-**START DOCKER**
+```bash
+docker info
+```
-Once you have `Docker` installed and running, you can use the following command to check the state:
+If you have something like this, it means you haven't started Docker:
```bash
docker info
+Server:
+ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
+Is the docker daemon running?
```
-It should output a text like this one:
+Start Docker, this is how the right output looks like:
-```text
+```bash
+docker info
Client:
Context: default
Debug Mode: false
@@ -124,142 +127,105 @@ Server:
Stopped: 10
```
-If you see a message like the following, it most likely means you need to start `Docker`.
+### 1.3. Install VcXsrv
-Open the docker desktop app in this case.
+To display charts with your container, you need : VcXsrv.
-```text
-Server:
-ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
-Is the docker daemon running?
-```
+You can download VcXsrv here : [Download VcXsrv](https://sourceforge.net/projects/vcxsrv)
-## 2. Pulling and running `OpenBBTerminal Docker Container`
+When running VcXsrv program check the option: `Disable access control`
-**DOCKER COMPOSE**
+### 1.4. Pull and run the container
-Here are the commands to use `Docker Compose` to pull and run the `OpenBBTerminal Docker Container`:
+Execute this commands:
```bash
curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.yaml
-docker compose run openbb
+docker compose run poetry
```
-The command line with `curl` is downloading this file : [`docker-compose.yaml`](https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.yaml).
-
-The `docker-compose.yaml` file is a configuration file telling `Docker Compose`:
+This will download and run the file: `docker-compose.yaml`
-- where to find `OpenBBTerminal Docker Container`
-- how to run this container.
+This file contents the settings to pull and run OpenBB Terminal Docker image.
-The second command runs `Docker Compose` on the service `poetry` defined in this `docker-compose.yaml` file.
+## 2. macOS
-This second command must be run in the same folder in which `docker-compose.yaml` file is.
+### 2.1. Install and run Docker Desktop
-**DOCKER**
+Install and run Docker Desktop as describe above in this document.
-If you don't have `Docker Compose` you can also use `Docker` directly to run the `OpenBBTerminal Docker Container`.
+### 2.2. Install XQuartz
-Here is the commands to run:
+You can downlaod XQuartz here: [Download XQuartz](https://www.xquartz.org)
-```bash
-docker pull ghcr.io/openbb-finance/openbbterminal/openbb:latest
+Open X Quartz.
-docker run -v ~/.openbb_terminal/:/home/python/.openbb_terminal -v ~/OpenBBUserData:/home/python/OpenBBUserData -it --rm ghcr.io/openbb-finance/openbbterminal/openbb:latest
-```
+Then on `Preferences > Security`.
-You can replace `latest` with the version you want to pull and run.
+Make sure both of these options are enabled:
-Note for windows:
+- `Authenticate connections`
+- `Allow connections from network clients`
-```text
- Ignore this message if you are using Powershell or a more evolved interpreters.
- If you are using the builtin Windows interpreter.
- Replace `~` by `%USERPROFILE%` in the command above.
-```
+It should look like this:
+ ![Screen Shot 2021-09-08 at 12 21 48 PM](https://user-images.githubusercontent.com/18151143/132548605-235d774b-9aa6-4a45-afcf-58fb775d376a.png)
-## 3. Configuring your X-server to show plots
+### 2.3. Get Docker IP
-In order to display plots in the docker container, we need to configure the XServer on the host machine. Without this configuration the interactive charts will not be displayed.
+To get Docker IP you can use this command:
-### On Windows
-
-Download and install : [VcXsrv](https://sourceforge.net/projects/vcxsrv/)
+```bash
+IP=$(ifconfig | grep inet | grep -v "127.0.0.1" | awk '$1=="inet" {print $2}')
+```
-When running the program is important to check "Disable access control"
+### 2.4. Pull and run the container
-Run `Docker Compose` like this:
+Execute this commands:
```bash
curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.yaml
-docker compose run poetry
-```
-
-Or run `Docker` directly:
-
-```bash
-docker run -v ~/.openbb_terminal:/home/python/.openbb_terminal -v ~/OpenBBUserData:/home/python/OpenBBUserData -it --rm --env DISPLAY=host.docker.internal:0.0 ghcr.io/openbb-finance/openbbterminal/openbb:latest
+xhost +$IP
+docker compose run -e DISPLAY=$IP:0 openbb
```
-### X-Server on macOS
+This will download and run the file: `docker-compose.yaml`
-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`.
+This file contents the settings to pull and run OpenBB Terminal Docker image.
-For help setting up the X-Server continue reading:
+The `xhost +$IP` and `DISPLAY=$IP:0` parts are there to allow charts display.
-#### Setting up X Quartz/X11
+## 3. Linux
-On macOS the X11 client of choice is [XQuartz](https://www.xquartz.org/). On Windows it's [Xming](http://www.straightrunning.com/XmingNotes/). XQuartz will be used as an example further on.
+### 3.1. Install and run Docker Desktop
-0. Install X Quartz from <https://www.xquartz.org/>
-1. With X Quartz open: go to Preferences -> Security and make sure both options are enabled.
- ![Screen Shot 2021-09-08 at 12 21 48 PM](https://user-images.githubusercontent.com/18151143/132548605-235d774b-9aa6-4a45-afcf-58fb775d376a.png)
+Install and run Docker Desktop as describe above in this document.
-#### Adding the display for Docker
+### 3.2. Pull and run the container
-From the command prompt or terminal, run the following to add your local configuration to the list of allowed access control:
+Execute this commands:
```bash
-IP=$(ifconfig | grep inet | grep -v -e "127.0.0.1" | awk '$1=="inet" {print $2}')
-xhost + $IP
-```
-
-Now we can run the docker container, adding the display to the environment:
+curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/main/build/docker/docker-compose.yaml
-```bash
-docker run -v ~/.openbb_terminal/:/home/python/.openbb_terminal -v ~/OpenBBUserData:/home/python/OpenBBUserData -it --rm --env-file=path/to/setenv --env DISPLAY=$IP:0 ghcr.io/openbb-finance/openbbterminal/openbb:latest
+xhost +local
+docker compose run openbb
```
-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. There is no need to install any clients.
-
-#### Local docker container
-
-We can use IPC socket to connect Desktop.
+Note: if you're using remote docker host, you can connect with `ssh -X <FQDN/IP>`.
-Add this setting to your `.env` file.
+## 4. Advanced: without Docker Compose
-```bash
-OPENBB_BACKEND=Qt5Agg
-```
-
-And run the following commands.
+To run directly the docker image you can use the following command:
```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/openbb:latest
-xhost -local:
+docker run --rm -it \
+ -v ~/.openbb_terminal/:/home/python/.openbb_terminal \
+ -v ~/OpenBBUserData:/home/python/OpenBBUserData \
+ ghcr.io/openbb-finance/openbbterminal/openbb:latest
```
-If you're using remote docker host, you can connect with "ssh -X <FQDN/IP>".
-
-Then run the previous docker command.
-
</TabItem>
<TabItem value="python" label="Python">
This installation type supports both Windows and Unix systems (Linux + MacOS).