Skip to content

Tutorial for showing what you can do with docker to make your code reproducible and shareable

Notifications You must be signed in to change notification settings

jdkent/tutDockerRstudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Tutorial

Installation

  • Docker Desktop (if your computer/operating system is newish and is enterprise or business edition for windows)

  • Docker Toolbox (if you computer/operating system is not compatible with Docker Desktop)

Test Installation

With the docker quickstart terminal or a normal terminal, type: docker run hello-world

Additional Setup For Docker Toolbox

If you've installed Docker Desktop, you are fine, but if you installed Docker Toolbox, read on. We are going to be working through the browser with rstudio today and so we need to do some extra steps to allow docker to communicate with the browser.

  1. Once you've already installed and started docker and made sure it works, we will find the virtualbox application.
    virtualbox

  2. Once virtualbox is open, select the "default" box and make sure it is shut down, or otherwise not running.
    default

  3. Click the gear icon named settings.
    settings

  4. Select Network on the sidebar.
    network

  5. Click the triangle by "advanced" to expand options.
    advanced

  6. Select the port forwarding option and place the port numbers 8787 in both the host port and guest port. Name the connection rstudio.
    port

  7. Click on the quickstart terminal again to restart docker. Now you are ready to get started!

Hands on Exercise

run the docker image without explicitly downloading anything

Docker Desktop (Windows/Mac) or Docker native (Linux):

docker run --rm -p 127.0.0.1:8787:8787 -e PASSWORD=uibh jdkent/tut-rstudio

Docker Toolbox:

docker run --rm -p 192.168.99.100:8787:8787 -e PASSWORD=uibh jdkent/tut-rstudio

If you want to persistently change files, you will have to clone the repository where the data came from.

git clone https://github.com/jdkent/tutDockerRstudio.git
cd tutDockerRstudio

Docker Desktop (Windows/Mac) or Docker native (Linux):

docker run --rm -p 127.0.0.1:8787:8787 -e PASSWORD=uibh -v ${PWD}:/home/rstudio/project jdkent/tut-rstudio

Docker Toolbox:

docker run --rm -p 192.168.99.100:8787:8787 -e PASSWORD=uibh -v ${PWD}:/home/rstudio/project jdkent/tut-rstudio

About

Tutorial for showing what you can do with docker to make your code reproducible and shareable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published