john-shine / mega.syno

Make possible to use mega.nz`s megasync on Synology with Docker
GNU General Public License v3.0
50 stars 11 forks source link

Local build image does not run #11

Closed salvq closed 3 years ago

salvq commented 3 years ago

Hi, just tried to build docker image from the latest Dockerfile which seems to be built fine. But getting an issue when try to create docker from this built image. On the other side, docker create runs just fine from latest docker hub, see below

  1. Here is a detail log from local docker build, pastebin
  2. Docker run keeps failing from local build docker (point 1)
    
    [/share/Download/1] # sudo docker run --name megasync-build --restart always -e DISPLAY=':1' -e HOME='/home/mega' -e USER='megasync' -e vnc_password="XXXXX" -p 5901:5901 -v /share/CACHEDEV1_DATA/Download:/megaclient-folders/:ro 1_megaclient:latest

Can't find file /home/mega/.vnc/bde91068e579:1.pid You'll have to kill the Xvnc process manually

New 'bde91068e579:1 (megasync)' desktop is bde91068e579:1

Creating default config /home/mega/.vnc/config Starting applications specified in /home/mega/.vnc/xstartup Log file is /home/mega/.vnc/bde91068e579:1.log

Killing Xvnc process ID 24 [/share/Download/1] #

3. Docker run keeps running OK from docker hub

[/share/Download/1] # sudo docker run --name megasync-docker --restart always -e DISPLAY=':1' -e HOME='/home/mega' -e USER='megasync' -e vnc_password="XXXXX" -p 5901:5901 -v /share/CACHEDEV1_DATA/Download:/megaclient-folders/:ro johnshine/mega.syno:1.5

Can't find file /home/mega/.vnc/125b6f989462:1.pid You'll have to kill the Xvnc process manually

New '125b6f989462:1 (megasync)' desktop is 125b6f989462:1

Creating default config /home/mega/.vnc/config Starting applications specified in /home/mega/.vnc/xstartup Log file is /home/mega/.vnc/125b6f989462:1.log



I have not been able to locate the issue, there must be one. Can you help here ?
salvq commented 3 years ago

@john-shine , do you have some ideas how to troubleshoot more ?

john-shine commented 3 years ago

@salvq you can copy logs to local machine, via: docker cp bde:/home/mega/.vnc/bde91068e579:1.log . then paste contents here, it contains detail of xstartup process running

salvq commented 3 years ago

It was an issue with permission

Xvnc TigerVNC 1.8.0 - built Nov 16 2020 16:47:50
Copyright (C) 1999-2017 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12004000, The X.Org Foundation

Tue May  4 18:19:45 2021
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5902
 vncext:      created VNC server for screen 0
sh: /home/mega/.vnc/xstartup: Permission denied

I tested this small change and created pull request #12