dockerfile "пакет 'RODBC' недоступен (для R версии 3.6.3)" - PullRequest
0 голосов
/ 07 августа 2020

Я прошел через несколько стековых решений, включая этот , но не смог получить мой docker образ для сборки. Этот ранее рабочий образ больше не строится. Есть мысли о том, как установить RODB C в R 3.6.3?

Вот мой файл докеров

FROM ubuntu:bionic

RUN useradd docker \
        && mkdir /home/docker \
        && chown docker:docker /home/docker \
        && addgroup docker staff

RUN apt-get update \
        && apt-get install -y --no-install-recommends \
                software-properties-common \
                ed \
                less \
                locales \
                vim-tiny \
                wget \
                ca-certificates \
        && add-apt-repository --enable-source --yes "ppa:marutter/rrutter3.5" \
        && add-apt-repository --enable-source --yes "ppa:marutter/c2d4u3.5"

## Configure default locale, see https://github.com/rocker-org/rocker/issues/19
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
        && locale-gen en_US.utf8 \
        && /usr/sbin/update-locale LANG=en_US.UTF-8

ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8

## This was not needed before but we need it now
ENV DEBIAN_FRONTEND noninteractive

# Now install R and littler, and create a link for littler in /usr/local/bin
# Default CRAN repo is now set by R itself, and littler knows about it too
# r-cran-docopt is not currently in c2d4u so we install from source
RUN apt-get update \
        && apt-get install -y --no-install-recommends \
                 littler \
                 r-base \
                 r-base-dev \
                 r-recommended \
        && ln -s /usr/lib/R/site-library/littler/examples/install.r /usr/local/bin/install.r \
        && ln -s /usr/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
        && ln -s /usr/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
        && ln -s /usr/lib/R/site-library/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \
        && install.r docopt \
        && rm -rf /tmp/downloaded_packages/ /tmp/*.rds \
        && rm -rf /var/lib/apt/lists/*

RUN apt-get update
#These are all required, the exact version, for SQL Server to work
RUN apt-get install -y gnupg2 libssl1.0 libssl1.0-dev apt-transport-https

RUN apt-get install -y libcurl4-openssl-dev curl

RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc unixodbc-dev

#This is required for the R curl package - it fails to install with just libssl1.0
RUN apt-get install -y libssl-dev

RUN install.r tidyr bigrquery dplyr RODBC sqldf readr httr uuid

COPY src/sale_upload_v2.r /usr/local/src/scripts/sale_upload_v2.r
WORKDIR /usr/local/src/scripts

При сборке я получаю сообщение об ошибке:

 package ‘RODBC’ is not available (for R version 3.6.3)
...