title: How to use multiline EOF in Dockerfile
body: <p>I am trying to isntall an R package from the command line using docker.  I don't get how to use EOF with docker</p>
  
  <p>Below is my dockerfile:</p>
  
  <pre><code>Step 8/8 : RUN R --vanilla &lt;&lt;EOF install.packages('plyr', repos='http://cran.us.r-project.org') q() EOF
   ---&gt; Running in 767d4e577542
  /bin/sh: 1: Syntax error: "(" unexpected
  The command '/bin/sh -c R --vanilla &lt;&lt;EOF install.packages('plyr', repos='http://cran.us.r-project.org') q() EOF' returned a non-zero code: 2
  </code></pre>