Skip to content

add dockerfile for britpol#1

Open
Sparrow0hawk wants to merge 1 commit intojackobailey:masterfrom
Sparrow0hawk:add-dockerfile
Open

add dockerfile for britpol#1
Sparrow0hawk wants to merge 1 commit intojackobailey:masterfrom
Sparrow0hawk:add-dockerfile

Conversation

@Sparrow0hawk
Copy link
Copy Markdown

Big fan of this package for some personal projects although found some trickiness when installing it on my M1 mac. Therefore I had a go at writing a Dockerfile to containerise the package to enable me to use it from within a container.

Requirements

Need Docker installed on your machine.

Usage

This is a simple Dockerfile that builds a container using the r-base image, installing some library dependencies before installing devtools and using devtools to install britpol form GitHub. On using docker run the container returns an R console from within the container from which you can use the britpol package.

Building

You can build this locally with docker commands:

$ cd britpol/

$ docker build . -t britpol-docker:latest

Running

After docker builds the image you can run it with the following commands:

$ docker run -it britpol-docker:latest

To mount your current directory on your host machine (to egress data):

$ docker run -it -v $PWD:/home/docker britpol-docker:latest

Let us know if you'd be interested in this PR at all and no worries if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant