business-science / shinyauth

Dockerfile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error - unable to locate liblwgeom-dev

mic0331 opened this issue · comments

I noticed that building this docker image is causing an issue with the latest shiny-verse version.
More specifically, when running

sudo docker build . -t shinyauth:latest

I am getting the error

E: Unable to locate package liblwgeom-dev

If I comment the Linux dependcy liblwgeom-dev the build does work and I am not getting any issue.
I guess the dependency is now included as part of shiny-verse.

Thanks

Hi @mic0331

I am having the same issue.
Did you found a solutions?

I tried to change the tag of the shiny-verse version from latest to 3.6.0.

FROM rocker/shiny-verse:3.6.0

I temporary solved this issue.

Sincerely,

I solved it by removing the liblwgeom-dev library and installing rstudio/webshot2 before the other packages.

My image is almost identical, at least like this it worked:

FROM rocker/shiny-verse:4.1.2

RUN apt-get update -qq \
    && apt-get -y --no-install-recommends install \
        lbzip2 \
        libfftw3-dev \
        libgdal-dev \
        libgeos-dev \
        libgsl0-dev \
        libgl1-mesa-dev \
        libglu1-mesa-dev \
        libhdf4-alt-dev \
        libhdf5-dev \
        libjq-dev \
        libpq-dev \
        libproj-dev \
        libprotobuf-dev \
        libnetcdf-dev \
        libsqlite3-dev \
        libssl-dev \
        libudunits2-dev \
        netcdf-bin \
        postgis \
        protobuf-compiler \
        sqlite3 \
        tk-dev \
        unixodbc-dev \
        libsasl2-dev \
        libv8-dev \
        libsodium-dev \
    && installGithub.r rstudio/webshot2 \    
    && install2.r --error --deps TRUE \
        shinyWidgets \
        shinythemes \
        shinyjs \
        bs4Dash \
        fresh \
        data.table \
        here \
        mongolite \
        jsonlite \
        config \
        remotes \
        arrow \
        reactable \
        reactablefmtr \
        plotly \
    && installGithub.r PaulC91/shinyauthr

Hey guys,
I'm not sure how I missed this convo up until now. But I've just updated the Docker Hub mdancho/shinyauth to work with shiny==1.7.1.

https://hub.docker.com/repository/docker/mdancho/shinyauth

Key Changes:

  • mdancho/shinyauth:version1.0: Is upgraded to shiny 1.7.1
  • mdancho/shinyauth:version0.0: Contains the previous docker container

Here's the new DockerFile. This is available on Docker Hub, and can be pulled with docker pull mdancho/shinyauth:latest.

# VERSION 1.0
# Shiny Version: 1.7.1

FROM rocker/shiny-verse:latest

RUN apt-get update -qq \
    && apt-get -y --no-install-recommends install \
        lbzip2 \
        libfftw3-dev \
        libgdal-dev \
        libgeos-dev \
        libgsl0-dev \
        libgl1-mesa-dev \
        libglu1-mesa-dev \
        libhdf4-alt-dev \
        libhdf5-dev \
        libjq-dev \
        # liblwgeom-dev \ # No longer needed 
        libpq-dev \
        libproj-dev \
        libprotobuf-dev \
        libnetcdf-dev \
        libsqlite3-dev \
        libssl-dev \
        libudunits2-dev \
        netcdf-bin \
        postgis \
        protobuf-compiler \
        sqlite3 \
        tk-dev \
        unixodbc-dev \
        libsasl2-dev \
        libv8-dev \
        libsodium-dev \
            
        # textshaping dependencies - HarfBuzz
        libharfbuzz-dev \
        libfribidi-dev \
        gcc \
        g++ \
        libfreetype6-dev \ 
        libglib2.0-dev \
        libcairo2-dev \
        meson \
        pkg-config \
        gtk-doc-tools \
    # Installs from MRAN (Microsoft), packages tend to be older so must specify cran rstudio mirror
    && install2.r --error --deps TRUE -r http://cran.rstudio.com \
        shiny \
        bslib \
        shinyWidgets \
        shinythemes \
        shinyjs \
        mongolite \
        jsonlite \
        config \
        remotes \
        tidyquant \
        plotly \
    # Installs from GitHub 
    && installGithub.r business-science/shinyauthr

I will mention that there is a breaking change that happened in the Application Library.

If you use the Version 1.0 (latest) version, you'll need to modify the application library navbar_page_with_inputs() function:

The difference is that navbar[[3]] -> navbar[[4]].

# FUNCTIONS ----
# https://stackoverflow.com/a/40755608/6713793
navbar_page_with_inputs <- function(..., inputs) {
    navbar <- navbarPage(...)
    form <- tags$form(class = "navbar-form navbar-right", inputs)
    navbar[[4]][[1]][[1]]$children[[1]]$children[[2]] <- htmltools::tagAppendChild(
        navbar[[4]][[1]][[1]]$children[[1]]$children[[2]], form)
    navbar
}