Video link https://youtu.be/1Q3IEVhvmoY
The accompaniment video and this document, tells you all about installing and running the Docker Desktop on your Windows computer and installing the RSTUDIO docker. You would also learn how to run the rstudio in the docker environment. How to copy the files from your windows desktop to your docker image and from your docker image to your windows computer.
All information is available below. Watch the youtube video https://youtu.be/1Q3IEVhvmoY for the actual demonstration of the following steps.
Install Docker Desktop on your windows computer first.
Now open a windows command prompt by type cmd in the start menu of windows Type the following
docker run –rm -p 8787:8787 -e PASSWORD=mypassword –name myrstudio rocker/rstudio
Rstudio docker installation will now begin and take around 3 to 5 minutes to complete. If you go to the Docker Desktop you would see that the RStudio docker is now available and running.
Open up your Internet browser. Type localhost:8787 You would be shown a login and password dialog box
Your username is rstudio and your password is mypassword
You would now get the Rstudio working in your browser.
We ran the following code within the Rstudio docker and produced this chart.
library(ggplot2)
pl <- ggplot(data = mpg,aes(x= manufacturer))
pl <- pl + geom_bar()
pl
How to copy the data files from your Windows computet to your rstudio docker image open a cmd prompt in your windows computer The structure of the command is as below.
docker cp sourcefile destinationfolder
Which file do you want to copy you need to specify the souce file from your windows computer eg. c:.csv
Where do you want to copy the above file on your docker container eg./home/rstudio
Now the actual command is as below
Copying from your windows desktop to your docker container docker cp c:.csv myrstudio:/home/rstudio
Copying from your docker container to your windows desktop docker cp myrstudio:/home/rstudio/mydata.csv c:\tmp
Video link https://youtu.be/1Q3IEVhvmoY