重新启动后,Rocker / Shiny看不到应用程序

时间:2019-02-08 07:17:06

标签: docker shiny

摇摆器/光泽器无法识别主机操作系统中的光泽应用程序是什么原因?

我正在使用Rocker / Shiny在Windows上试用闪亮的应用程序。

这是我开始图片的方式:

docker run -d -p 80:3838 -v D:/Projects/DockedShiny/apps/:/srv/shiny-server/ -v D:/Projects/DockedShiny/logs:/var/log/shiny-server/ rocker/shiny

我可以看到闪亮的开始了

C:\Users\Honza>docker logs gallant_thompson

*** warning - no files are being watched ***
[2019-02-08T06:49:04.860] [INFO] shiny-server - Shiny Server v1.5.9.1 (Node.js v8.11.3)
[2019-02-08T06:49:04.887] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2019-02-08T06:49:04.927] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2019-02-08T06:49:04.931] [INFO] shiny-server - Starting listener on http://[::]:3838

编辑任何人都暗示*** warning - no files are being watched ***到底是什么意思?我怀疑这可能是一个线索。

通过检查配置,我可以看到它已配置为在映像启动期间指定的文件和文件夹:

root@778e307632ab:/etc/shiny-server# more shiny-server.conf
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;

# Define a server that listens on port 3838
server {
  listen 3838;

  # Define a location at the base URL
  location / {

    # Host the directory of Shiny Apps stored in this directory
    site_dir /srv/shiny-server;

    # Log all Shiny output to files in this directory
    log_dir /var/log/shiny-server;

    # When a user visits the base URL rather than a particular application,
    # an index of the applications available in this directory will be shown.
    directory_index on;
  }
}

尽管如此,闪亮的Web目录列表为空,并且按名称指定应用程序(例如http://localhost/myapp)时,却显示“找不到页面”。 Shiny日志位置中没有新日志。

完全相同的方案可以工作几个月。我最近需要重新启动主机,但现在无法识别应用程序了。

2 个答案:

答案 0 :(得分:1)

服务器抱怨以root用户身份运行。我将从添加--user shiny开始。另外,您不是使用特定版本而是最新版本,因此我可以看到摇摆/发光图像是几天前更新的,因此它可能被破坏或与以前的版本不同。我会坚持使用3.5.1或您喜欢的任何版本,例如rocker/shiny:3.5.1

答案 1 :(得分:0)

LSS:问题在于受影响的计算机上最近更改的用户名。 Docker正在缓存旧版本,需要在docker settings-> Shared Drives菜单中显式重置

更多详细信息:https://github.com/rocker-org/shiny/issues/59

相关问题