title: How to create a docker image of an existing R Shiny app in windows?
body: <p>The dockerization process of an R shiny app is done through rocker/shiny image. I require to run the dockerization on an R shiny app from a windows system. The only problem is that rocker/shiny used for this process is a Linux based container. Therefore, I am unable to generate an image that runs on my windows system. Utilization of an external VPS or VM is not an option for me due to security reasons.</p>
  
  <p>I have tried writing a docker file that would run for windows, but the problem is that the container is Linux based.</p>
  
  <p>My Dockerfile</p>
  
  <pre><code>FROM rocker/r-ver:3.5.1 
  
  #installing R libraries
  
  RUN R -e "install.packages(c('shiny', 'shinydashboard'), repos='http://cran.us.r-project.org')"
  
  # Copy configuration files into the Docker image
  COPY shiny-server.conf  /etc/shiny-server/shiny-server.conf
  COPY /app/srv/shiny-server/
  
  # Make the ShinyApp available at port 80
  EXPOSE 80
  
  #Copy further configuration files into the Docker image
  COPY shiny-server.sh /usr/bin/shiny-server.sh
  
  CMD ['Rscript', 'app_run.R'] 
  (original documentation mentions a .sh file which is not running on my system 
  because of the Linux windows file path issues)
  </code></pre>
  
  <p>After running there 2 commands I expect my shiny app to run on localhost:8080</p>
  
  <pre><code>Get-Content Dockerfile | docker build -
  
  docker run --name DOCKERapp -p 8080:8080 &lt;image_name&gt;
  </code></pre>