As the R compute environment and packages change over time, we have created a Docker container to ensure all our builds are reproducible into the future.

If you have Docker installed, you can recreate the compute environment as follows. For more instructions on running docker, see the info from the R docker project rocker. Our docker container is build off the rocker/verse container, version 3.6.1. This includes

  • R version 3.6.1
  • rstudio
  • tidyverse & devtools
  • tex & publishing-related packages

On top of that, we install everything needed to build AusTraits and the reports.

Running via Docker

First fetch the container:

docker pull traitecoevo/austraits.build:3.6.1

Then launch it via:

docker run --user root -v $(pwd):/home/rstudio/ -p 8787:8787 -e DISABLE_AUTH=true traitecoevo/austraits.build:3.6.1

Adding a -d into the command above will cause the image to run in the background.

The code above initialises a docker container, which runs an rstudio session, which is accessed by pointing your browser to localhost:8787.

Note, this container does not contain the actual github repo, only the software environment. If you run the above command from within your downloaded repo, it will map the working directory as the current working directory inside the docker container.

Building Docker container

The recipe used to build the docker container is included in the Dockerfile in this repo. Our image builds off rocker/verse:3.6.1 container via the following command, in a terminal contained within the downloaded repo:

docker build -t traitecoevo/austraits.build:3.6.1 .

Images are pushed to dockerhub (here):

docker push traitecoevo/austraits.build:3.6.1