Dockerfile isn't buildable #588
Replies: 1 comment
-
I did a workaround when I made my dockerfile. I was having issues with libraries not installing, like libxml2-dev. Instead of using the dockerfile Golem made, I took some of the code and made my own via rocker-versioned2. You'll have 2 extra folders - stacks and scripts that Golem may warn - these are for building images. `FROM rocker/shiny-verse:4.0.3 Rocker image includes R, Shiny, and tidyverseLABEL org.label-schema.license="GPL-2.0" RUN /rocker_scripts/install_geospatial.sh COPY . ./app RUN echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site EXPOSE 3838 CMD ["R", "-e", "shiny::runApp('/app', host = '0.0.0.0', port = 3838)"]` |
Beta Was this translation helpful? Give feedback.
-
Hi all. I'm having trouble building a Docker image based upon the Dockerfile create by
golem::add_dockerfile()
. I'm relatively new to Docker, so I might be doing something wrong. I appreciate any help.I'm trying to create a Dockerfile, and then build locally to make sure it works. Sorry for the lengthy post. I tried a few things, which all resulted in errors.
First, I tried using the Dockerfile as it is produced by
golem:add_dockerfile()
. This produced this Dockerfile:There was a pretty immediate error when trying to build, because
libcurl4-gnutls-dev
is missing:Then I tried to add
libcurl4-gnutls-dev
, but it looks like it can't coexist withlibcurl4-openssl-dev
:Then I tried removing
libcurl4-openssl-dev
entirely, and just leavinglibcurl4-gnutls-dev
. In this case, I was able to get past the immediate error, and at least get to the portion of the build that installs R packages. However, there was a problem withgert
:Then, I read here about what might (?) be a related issue. I tried using the CRAN PPA instead, with a new Dockerfile:
This results in a new error for
gert
:I really have no idea how to make this build. 🙁 Thank you for any help.
Beta Was this translation helpful? Give feedback.
All reactions