繁体   English   中英

shiny docker 映像构建因 ubuntu ZEFE90A8E604A7C840E88D03A67F6Z 问题而失败

[英]shiny docker image build failed due to ubuntu package issue

我正在尝试为我的 R shiny 应用程序构建 docker 图像。 下面是Dockerfile

# Install R version 3.6
FROM r-base:3.6.0

# Install Ubuntu packages
RUN apt-get update && apt-get install -y \
    sudo \
    gdebi-core \
    pandoc \
    pandoc-citeproc \
    libcurl4-gnutls-dev \
    libcairo2-dev \
    libxt-dev \
    xtail \
    wget \
    libudunits2-dev \
    libgdal-dev

# Install R packages that are required
RUN R -e "install.packages(c('remotes', 'tidyr', 'dplyr', 'ggplot2', 'stringr','shiny', 'shinydashboard','shinyWidgets','shinyjs', 'rlang','scales','DT','lubridate', 'plotly',  'leaflet', 'leafpop', 'visNetwork', 'wordcloud2', 'arules'), repos='http://cran.rstudio.com/')"
RUN R -e "remotes::install_github('nik01010/dashboardthemes')"

# Download and install ShinyServer (latest version)
RUN wget --no-verbose https://download3.rstudio.org/ubuntu-14.04/x86_64/VERSION -O "version.txt" && \
    VERSION=$(cat version.txt)  && \
    wget --no-verbose "https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-$VERSION-amd64.deb" -O ss-latest.deb && \
    gdebi -n ss-latest.deb && \
    rm -f version.txt ss-latest.deb

# 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 ["/usr/bin/shiny-server.sh"]

然而,我的形象建设很早就失败了。 以下是所有日志。 似乎有些 Ubuntu package 问题我不太明白。

我是 docker 的新手。 我不知道如何处理这些错误消息。 感谢是否有人可以帮助找出需要做的事情。 谢谢。

Sending build context to Docker daemon  113.4MB
Step 1/10 : FROM r-base:3.6.0
 ---> 876f4d7b60e9
Step 2/10 : RUN apt-get update && apt-get install -y     sudo     gdebi-core     pandoc     pandoc-citeproc     libcurl4-gnutls-dev     libcairo2-dev     libxt-dev     xtail     wget  libudunits2-dev      libgdal-dev
 ---> Running in 825a69c5a05f
Get:2 http://deb.debian.org/debian testing InRelease [116 kB]
Get:1 http://cdn-fastly.deb.debian.org/debian sid InRelease [146 kB]
Get:3 http://deb.debian.org/debian testing/main amd64 Packages [7,690 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian sid/main amd64 Packages [8,225 kB]
Fetched 16.2 MB in 6s (2,724 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-7 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
The command '/bin/sh -c apt-get update && apt-get install -y     sudo     gdebi-core     pandoc     pandoc-citeproc     libcurl4-gnutls-dev     libcairo2-dev     libxt-dev     xtail     wget       libudunits2-dev         libgdal-dev' returned a non-zero code: 100

您收到的错误消息不是 Docker 特定的,而是与您的 package manager apt相关。

尽管您正在使用apt-get update package 列表,但您不会安装更新版本的软件包。 现在发生的情况是您正在尝试安装已安装的 package 的较新版本,这会导致错误消息。

如果您使用apt-get upgradeapt将安装已安装软件包的较新版本。

如下所示更改第 5 行将解决该问题:

RUN apt-get update && apt-get upgrade -y && apt-get install -y \

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM