2016-03-06 247 views
0
[[email protected] ~]$ docker start sharelatex 
sharelatex 
[[email protected] ~]$ docker logs sharelatex 
*** Running /etc/my_init.d/00_make_sharelatex_data_dirs.sh... 
mkdir: cannot create directory ‘/var/lib/sharelatex/data’: Permission denied 
chown: cannot access ‘/var/lib/sharelatex/data’: No such file or directory 
mkdir: cannot create directory ‘/var/lib/sharelatex/data’: Permission denied 
chown: cannot access ‘/var/lib/sharelatex/data/user_files’: No such file or directory 
mkdir: cannot create directory ‘/var/lib/sharelatex/data’: Permission denied 
chown: cannot access ‘/var/lib/sharelatex/data/compiles’: No such file or directory 
mkdir: cannot create directory ‘/var/lib/sharelatex/data’: Permission denied 
chown: cannot access ‘/var/lib/sharelatex/data/cache’: No such file or directory 
mkdir: cannot create directory ‘/var/lib/sharelatex/tmp’: Permission denied 
chown: cannot access ‘/var/lib/sharelatex/tmp’: No such file or directory 
mkdir: cannot create directory ‘/var/lib/sharelatex/tmp’: Permission denied 
chown: cannot access ‘/var/lib/sharelatex/tmp/uploads’: No such file or directory 
mkdir: cannot create directory ‘/var/lib/sharelatex/tmp’: Permission denied 
chown: cannot access ‘/var/lib/sharelatex/tmp/dumpFolder’: No such file or directory 
*** /etc/my_init.d/00_make_sharelatex_data_dirs.sh failed with status 1 

*** Killing all processes... 
+0

嘗試'sudo docker start sharelatex' –

+0

看起來像設置爲在'docker start'運行的shell腳本(通過'cmd'或'entrypoint')試圖運行一些它不需要的命令有權做。 – CtheGood

+0

sudo docker start sharelatex不起作用。 –

回答

0

看起來您已按照sharelatex網站上的說明,通過docker run -v將一個主機文件夾掛載到映像。

當擁有主文件夾的用戶擁有與Docker容器用戶不同的uid時,您將遇到Docker用戶無法寫入掛載文件夾的權限問題。

解決方案1:您需要找出Docker容器用戶的uid,並將主機chown裝入的文件夾找到具有相同uid的用戶。

解決方案2:或者,您可以在未裝入文件夾的情況下運行泊塢窗圖像。在這種情況下,您的數據存儲在容器中,並且如果刪除容器,則需要確保先備份數據。