run r script using docker kaggle image

I am trying to reproduce results of an R script on my local Windows OS (reproduce the results which it gave on kaggle server). For this someone suggested to use docker images to run r script on my local.

I have installed docker and finished the steps to set it up by following instructions given here

  • “dockerfile” text file busy
  • Docker and gulp
  • Access a docker containers own localhost inside that container — php apache
  • How to mix several python scripts into a shell script?
  • Why does `docker images` also show the base image?
  • Docker-client Java: How to keep instances running?
  • After installing, I am struggling with on how to create the kaggle R image and run an R script on my local using local resources/data. Can someone please help me with these?

  • Building Docker images with Jenkins that runs inside a Docker container
  • nginx app in docker not working on remote machine
  • Exposing a WSGI app from a Docker container
  • Docker image for sailsjs development on macosx hangs
  • docker commit apache container to image brings trouble
  • How to restrict environment variables passed to linked containers
  • One Solution collect form web for “run r script using docker kaggle image”

    You can load already builded image rstat from dockerhub:

    docker run kaggle/rstats

    For using your local data you should create volume:

    docker run -v /you/local/data/path:path/in/docker/container kaggle/rstat

    Volume binds your local storage with container storage. Also you can create additional volume for output data.

    The last line in rstate dockerfile is

    CMD ["R"]

    It means that R console will be called after container start. Just past your script in terminal (script should use data from mounted volume in container and write result to mounted output volume). After script execution you can stop container. Your output data will be saved on your local machine.

    P.S. image is giant (6Gb). I never seen before such large docker image.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.