2

I am trying to build a dockerfile for a Euler App to test ShinyProxy via "http://www.shinyproxy.io/deploying-apps/"

I am using the dockerfile from that link.

Upon using the command sudo docker build -t openanalytics/shinyproxy-template .

I get an error while the build is processing that:

Error: unexpected end of input
Execution halted
The command '/bin/sh -c R -e "install.packages(c('shiny', 'rmarkdown', repos='https://cloud.r-project.org/')" ' returned a non-zero code: 1.

I am curious why I am getting this error as this is the same exact command from the dockerfile.

What can I do to resolve this.

-Thanks

wligtenberg
  • 7,695
  • 3
  • 22
  • 28
Techno04335
  • 1,365
  • 6
  • 22
  • 43
  • Are you using the Dockerfile from that link or your own? – Roman Nov 16 '16 at 17:43
  • I am using the dockerfile from that link. – Techno04335 Nov 16 '16 at 17:45
  • 2
    Docker tells you what went wrong. When it tried to execute the install command, it got a non 0 return code, so the install failed. That's why the rest of the build process didn't finish. You'd have to do a little experimenting to see what caused the install to fail – Roman Nov 16 '16 at 17:47

1 Answers1

2

Look closely at the syntax of the R install library line and you will see its missing a closing parenthesis

I just manually fixed that syntax and it correctly builds that step

correct syntax

RUN R -e "install.packages(c('shiny', 'rmarkdown'), repos='https://cloud.r-project.org/')"

build it as

docker build --tag r_base .

NOTE - as docker build progresses it then fails later attempting to

COPY euler /root/euler

lstat euler: no such file or directory

To troubleshot this just comment out all Dockefile lines from offending onward and replace bottom line with

CMD ["/bin/bash"]

then it will build correctly and allow you to login to running container to further troubleshoot

docker run -ti r_base bash

I know nothing of R so will leave it to the reader to fix euler COPY ... evidently you must have euler sitting in your local directory prior to issuing the docker build command

...now after you issue above docker run command then from its internal to container prompt issue

cd /
find . | grep  Rprofile.site

./usr/lib/R/etc/Rprofile.site

That looks good so leave commented out its COPY in Dockerfile

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104