Skip to content

lance-waller-lab/docker-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

docker-base

Docker image for running R analyses used by the Waller lab. The Dockerfile contains all the instructions to build this image, using rocker/geospatial as a base template.

Includes TMB, INLA, STAN, and JAGS related R packages, as well as some spatial statistics software not already in rocker/geospatial.

Installing Docker

Instructions for installing Docker can be found here.

How to run the container on local machine

The following command tells docker to pull the image from DockerHub and launches a RStudio-Server Session. The session can then be accessed in your browser as http://localhost:8787.

docker run --rm -d -p 8787:8787 -e USER=username -e PASSWORD=password labwaller/base

When you access the RStudio Server for the first time in your browser, you will be prompted to login with the username and password you specified in your docker run command. Original passwords are especially important when working on remote servers.

Updating the image

The current automated image build workflow is inspired by the IHME Demographics team setup. A build is initiated when the Dockerfile has changed since the last commit and either i) a pull request to the master branch is opened ii) a push to master iii) a pushed tag. Only a push to master or a tagged commit will initiate a push to Docker Hub after a successful build. The tags should be used to differentiate versions of an image. A push to master will lead to an updated "latest" tag. To tag Git commits and push to the remote to initiate the automatic build an example call would be (without the curly brackets in the actual call):

git tag -a v{name.0.0}
git push origin v{name.0.0}

Creating custom image

For creating a Docker image custom to a specific analysis or paper, you can use the docker-base image here as the starting point! Simply create a new Dockerfile to create the new image. Below is a rough example.

FROM labwaller/base:latest

# Set up the file structure in the container to match your analysis.
# RUN mkdir /home/dir1 /home/dir2 

# Copy over any local data files to the container. 
# COPY localfile /home/localfile 

Helpful links

About

Docker base image for Waller lab analyses

Resources

Stars

Watchers

Forks

Packages

No packages published