A dockerised version of sen2r is available here: it contains a working RStudio environment with the package sen2r and all its dependencies (both R packages and runtime dependencies). It can be used in order to avoid troublings about compiling all the required R packages, or in case of problems with runtime dependencies (typically GDAL over Windows).

To use it:

  1. install Docker CE version 1.13 or higher;

  2. read the docker documentation in Part 1;

  3. obtain the image of sen2r:

    where latest corresponds to the software version in branch master (see here all the available docker tags);

  4. run the docker:

    where:

    • -e PASSWORD=sen2r is the password to be used to login;
    • -v $(pwd):/home/rstudio/host means that the current directory will be mounted in the docker, and its content will be available in the subdirectory host of the docker folder tree (to mount a different directory, replace $(pwd) with the desired directory);
    • -p 8777:8787 means that the dockerised RStudio will be accessible from port 8777 (change it to use a different port).
  5. access to the RStudio environment from http://localhost:8777, logging in with user rstudio and the password set as above;

  6. for online use, add the user’s SciHub credentials using the GUI or with the function:

    library(sen2r)
    write_scihub_login("<scihub_username>", "<scihub_password>")