Customised Docker container for RStudio.
To pull the image to your local machine, use the following command:
docker pull villegar/rstudio
To create a new container using previously downloaded image:
# replace <username> with an username of your choice
# replace <password> with a password of your choice
# replace <local> with a port of your choice
docker container run -e USER=<username> \
-e PASSWORD=<password> \
-p <local>:8787 \
--name rstudio -d villegar/rstudio:latest
e.g.
docker container run -e USER=villegar -e PASSWORD=666 -p 8787:8787 --name rstudio -d villegar/rstudio:latest
Using a web browser, navigate to https://localhost:<port>
To modify the newly created container:
docker container exec -it rstudio bash
To stop the container:
docker container stop rstudio
To remove the container from local storage:
docker container rm rstudio