barzan / dbseer

DBSeer
Apache License 2.0
118 stars 27 forks source link

DBSeer Docker on remote server #9

Open Inception95 opened 4 years ago

Inception95 commented 4 years ago

Hi, thanks for the great effort on DBSeer! I am currently running DBSeer on AWS instance using the DBSeer Docker image, however, I couldn't start the UI correctly based the "Docker Usage Guide for DBSeer.pdf".

Here are my steps to fix this:

  1. enable the X11 forwarding on aws instance
  2. install and start Xming on my local Windows laptop
  3. ssh to the aws instance and pull the DBSeer image
  4. echo $DISPLAY to check if it is the current_ip:11.0
  5. use DISPLAY_NUMBER=$(echo $DISPLAY | cut -d. -f1 | cut -d: -f2) to set the DISPLAY_NUMBER, which is 11 here
  6. use socat TCP4:localhost:60${DISPLAY_NUMBER} UNIX-LISTEN:/tmp/.X11-unix/X${DISPLAY_NUMBER} & to set the DISPALY inside and outside the docker correctly
  7. use the docker run -e DISPLAY -v /var/lib/postgresql/11/main/:/dbseer/dataset -v /tmp/.X11-unix/:/tmp/.X11-unix -v /root/.Xauthority:/root/.Xauthority --net=host --rm dongyoungy/dbseer /run_dbseer to start the UI, the .Xauthority should be mounted to the /root/ not /developer/ since the default user to the image is root.

Now I can start the UI.

reference: https://blog.yadutaf.fr/2017/09/10/running-a-graphical-app-in-a-docker-container-on-a-remote-server/