/usr/bin/shinny-server.sh:在Ubuntu上运行R Shinny docker时权限被拒绝
我构建了一个基本的R-Shining应用程序,并希望在Ubuntu 18.04虚拟机上对其进行dockerize 我遵循了这一点 并得到以下情况: R应用程序 应用程序R shinny-server.conf/usr/bin/shinny-server.sh:在Ubuntu上运行R Shinny docker时权限被拒绝,r,docker,shiny,R,Docker,Shiny,我构建了一个基本的R-Shining应用程序,并希望在Ubuntu 18.04虚拟机上对其进行dockerize 我遵循了这一点 并得到以下情况: R应用程序 应用程序R shinny-server.conf # Define the user we should use when spawning R Shiny processes run_as shiny; # Define a top-level server which will listen on a port server {
# Define the user we should use when spawning R Shiny processes
run_as shiny;
# Define a top-level server which will listen on a port
server {
# Instruct this server to listen on port 80. The app at dokku-alt need expose PORT 80, or 500 e etc. See the docs
listen 80;
# Define the location available at the base URL
location / {
# Run this location in 'site_dir' mode, which hosts the entire directory
# tree at '/srv/shiny-server'
site_dir /srv/shiny-server;
# Define where we should put the log files for this location
log_dir /var/log/shiny-server;
# Should we list the contents of a (non-Shiny-App) directory when the user
# visits the corresponding URL?
directory_index on;
}
}
shy-server.sh
#!/bin/sh
# Make sure the directory for individual app logs exists
mkdir -p /var/log/shiny-server
chown shiny.shiny /var/log/shiny-server
exec shiny-server >> /var/log/shiny-server.log 2>&1
目录结构是
- app/app.R
- Dockerfile
- shiny-server.sh
- shiny-server.conf
我用码头工人
Docker版本18.09.9,版本1752eb3
并使用
sudo docker build -t test .
但是当我运行它时
sudo docker run test
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/usr/bin/shiny-server.sh\": permission denied": unknown.
ERRO[0001] error waiting for container: context canceled
我浏览了提到这个问题的各种论坛,并尝试更改权限。
我很困惑,因为在我看来,这个案件是一个基本的例子
==评论后的版本====
我已更改.sh文件的所有权和权限
sudo chown shiny:shiny shiny-server.sh
sudo chmod u+ shiny-server.sh
重建图像
sudo docker build -t test .
重播
sudo docker run test
但是它什么也不做,没有任何类型的错误或消息,只是转到下一行。图像中的
/usr/bin/shinny server.sh
脚本是否实际标记为可执行?好的,大卫,我编辑了这个问题。
sudo docker build -t test .
sudo docker run test