title: How to get Rscript to run through docker?
body: <p>I am trying to get my Rscript to run through a list of data sets on docker. I have gotten the dockerfile set up correctly and it runs fine, the docker image builds fine, but everytime it tries to run through the Rscript, I get this error:</p>
  <pre><code>/app/model-1.r: line 24: syntax error near unexpected token `mosaic'
  /app/model-1.r: line 24: `library(mosaic)'
  </code></pre>
  <p>My image is based on r-ver in the dockerfile, which also installs all the necessary packages, and I have a command to run the script:</p>
  <pre><code>FROM rocker/r-ver:4.0.0
  
  RUN R -e &quot;install.packages('mosaic', repos = 'http://cran.us.r-project.org')&quot;
  COPY /model-1.r .
  CMD R -e &quot;source('/model-1.r')&quot;
  </code></pre>
  <p>and I've tried adding this command to the Rscript document itself:</p>
  <pre><code>#!/usr/bin/env Rscript
  
  library(mosaic)
  </code></pre>
  <p>but nothing has worked. Is there something glaring that I am missing here?</p>
  <p>This is the 'run' command that I am using in the terminal:</p>
  <pre><code>docker run \
       -v $(pwd)/synthetic_data:/data:ro \
       -v $(pwd)/output:/output:rw \
       -v $(pwd)/scratch:/scratch:rw \
       awesome-model:v1 bash /app/model-1.r
  </code></pre>
  <p>Thank you very much</p>