Windows using WSL 2

Author

Ivan Jacob Agaloos Pesigan

In this tutorial, we will go through the necessary steps to launch the dynr Docker container on Windows.

Installation Video Tutorial

Click here for a video tutorial of the installation process.

Installing Windows Subsystem for Linux (WSL)

  • Search for PowerShell or Command Prompt. Right click to run as an administrator, then type the following:
wsl --install --distribution Ubuntu
Note

There are times when the operating system requires a restart. After restarting, when the installation is successful, a new application Ubuntu will be available. Launch this application to continue.

  • When prompted:
    • Enter new UNIX username:
    • New password:
    • Retype new password:
  • You should see a prompt similar to the following which indicates that you are inside the newly installed Ubuntu instance. In the prompt, type exit to exit Ubuntu.
USER@HOST:~$

If the above instructions fail, you might be using an older version of Windows. See https://learn.microsoft.com/en-us/windows/wsl/install-manual for more details on how to manually install WSL.

Installing Docker Desktop

  • Download the the appropriate Docker Desktop for Windows from https://www.docker.com/products/docker-desktop/.
  • Double-click Docker Desktop Installer.exe to install Docker Desktop.
  • Launch Docker Desktop.
    • Click the Accept button to accept the terms of service to continue.
    • You may continue without creating an account or signing in.

Running the dynr Docker Container

  • Launch Docker Desktop.
  • In PowerShell, type the following to pull the latest Docker image:
docker pull jeksterslab/dynr-rocker:latest
  • In PowerShell, type the following to launch Rstudio Server1:
docker run --rm -ti -e PASSWORD=yourpassword -p 127.0.0.1:8787:8787 jeksterslab/dynr-rocker
  • Open http://localhost:8787 on your web browser to launch Rstudio Server.
    • username: rstudio
    • password: yourpassword2

  1. Note for developers only: Replace jeksterslab/dynr-rocker with jeksterslab/dynr-arma-rocker to use the arma branch.↩︎

  2. You can change the password by replacing yourpassword in PASSWORD=yourpassword.↩︎