Creating Docker Volumes in R-Studio Container

Viewed 23

I have been running a docker image that lets you interact with R studio in the browser. Here is the link to the R-Studio Browser Github. This code on Windows 10. Down below are the runtime parameters I ran to start the container:

docker run --rm -p 8787:8787 -e USER=guest -e PASSWORD=guest -v C:\Users\Edge\Desktop\coding\school-courses\Probiblity-Stats\R-code\running:/home/guest/r-docker tmlts/r-tidyverse-h2o

I want the scripts that I create within the R-studio container to also be available outside in on my host machine. So I would like to create a volume for all the files in the class-work directory within the container to be one to one with the \Probability-Stats\R-code\running directory on my host machine. The testing.R is the R files as an example in the directories below. So every time a new change is implemented and saved I want the host machine's/containers R file's contents to also be altered synchronously.

So within R studio container I have the following directories: Note that the directories r-docker and rstudio came with the image build and class-work directory was manually created by me.

.
├── class-work/
│   └── testing.R
├── r-docker
└── rstudio

Host machine Directory:

.
└── Probability-Stats/
    └── R-code/
        └── running/
            └── testing.R
0 Answers
Related