在Rstudio docker中安装本地主目录? [英] mounting local home directory in Rstudio docker?
本文介绍了在Rstudio docker中安装本地主目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过运行以下命令安装了rstudio服务器:
I installed rstudio server by running:
docker run -d -p 8787:8787 -e USER='MY_USER' -e PASSWORD='MY_PASSWORD' rocker/hadleyverse
我想将本地主目录(或文件夹)链接(挂载?)到该Docker容器.那可能吗?怎么样?
I would like to link (mount?) my local home directory (or a folder) to that docker container. Is that possible? how?
谢谢!
推荐答案
您使用 -v
或-volume
将目录安装到容器中.例如:
You use -v
or --volume
to mount directories into a container. For example:
docker run -d \
-p 8787:8787 \
-e USER='MY_USER' \
-e PASSWORD='MY_PASSWORD' \
-v $HOME:/src \
rocker/hadleyverse
现在,您的容器将具有一个名为/src
的文件夹,其中包含本地主文件夹的内容.
Now your container will have a folder named /src
with the contents of your local home folder.
这篇关于在Rstudio docker中安装本地主目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文