Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Rstudio docker中装载具有读取权限的本地目录而不运行根目录?_R_Docker_Containers_Rstudio_Write - Fatal编程技术网

在Rstudio docker中装载具有读取权限的本地目录而不运行根目录?

在Rstudio docker中装载具有读取权限的本地目录而不运行根目录?,r,docker,containers,rstudio,write,R,Docker,Containers,Rstudio,Write,我想在调用docker时挂载一个本地目录,并使该目录可供写入,而不必极端地使用户成为root用户 我能找到的最接近的答案是: 还是这个 在这里,一些响应者进行了详细的解释: 这是非常接近,因为我也运行完全相同的摇杆容器。那张海报看起来很开心,但我想知道这个解决方案是否能让人有写作的能力。是的,我花了很多时间阅读有关这方面的文档 在这种情况下,如果将此问题的答案发布在 因为考虑到类似问题的数量如此之多,很多人并不清楚解决方案 他们最接近于回答这个问题的是: Additional configur

我想在调用docker时挂载一个本地目录,并使该目录可供写入,而不必极端地使用户成为root用户

我能找到的最接近的答案是:

还是这个

在这里,一些响应者进行了详细的解释:

这是非常接近,因为我也运行完全相同的摇杆容器。那张海报看起来很开心,但我想知道这个解决方案是否能让人有写作的能力。是的,我花了很多时间阅读有关这方面的文档

在这种情况下,如果将此问题的答案发布在
因为考虑到类似问题的数量如此之多,很多人并不清楚解决方案

他们最接近于回答这个问题的是:

Additional configuration options

    Custom user name: -e USER=<CUSTOM_NAME>
    Custom user id, group id, UMASK: -e USERID=<UID>, -e GROUPID=<GID>, e UMASK=022

Custom uid/gid etc is usually only needed when sharing a local volume for a user/group whose id does not match the default (1000:1000). Failing to do this could make files change permissions on the linked volume when accessed from RStudio.

Adding additional users: From a root bash shell (see above), the usual debian linux commands can be used to create new users and passwords, e.g. 
这是我在尝试保存时遇到的错误

当我试图写一个简单的文件时

> getwd()
[1] "/home/rstudio/myfolder"

10 Apr 2021 01:04:52 [rsession-rstudio] ERROR system error 2 (No such file or directory) [path: /home/rstudio/myfolder/temp.R]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::openForWrite(std::shared_ptr<std::basic_ostream<char> >&, bool) const src/cpp/shared_core/FilePath.cpp:1482; LOGGED FROM: rstudio::core::Error rstudio::core::{anonymous}::openFileForWritingWithRetry(const rstudio::core::FilePath&, bool, int, std::shared_ptr<std::basic_ostream<char> >*) src/cpp/core/FileSerializer.cpp:73
>getwd()
[1] “/home/rstudio/myfolder”
2021年4月10日01:04:52[rsession rstudio]错误系统错误2(无此类文件或目录)[path:/home/rstudio/myfolder/temp.R];发生在rstudio::core::Error rstudio::core::FilePath::openForWrite(std::shared_ptr&,bool)const src/cpp/shared_core/FilePath.cpp:1482;记录自:rstudio::core::Error rstudio::core:{anonymous}::openFileForWritingWithRetry(const rstudio::core::FilePath&,bool,int,std::shared_ptr*)src/cpp/core/FileSerializer.cpp:73
> getwd()
[1] "/home/rstudio/myfolder"

10 Apr 2021 01:04:52 [rsession-rstudio] ERROR system error 2 (No such file or directory) [path: /home/rstudio/myfolder/temp.R]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::openForWrite(std::shared_ptr<std::basic_ostream<char> >&, bool) const src/cpp/shared_core/FilePath.cpp:1482; LOGGED FROM: rstudio::core::Error rstudio::core::{anonymous}::openFileForWritingWithRetry(const rstudio::core::FilePath&, bool, int, std::shared_ptr<std::basic_ostream<char> >*) src/cpp/core/FileSerializer.cpp:73