簡體   English   中英

Docker build :不可滿足的約束

[英]Docker build :unsatisfiable constraints

我正在嘗試設置可以運行 CVTree 3.0 的 docker 映像( https://github.com/ghzuo/CVTree )。 但是,我收到了這個錯誤:

    Sending build context to Docker daemon  206.1MB
Step 1/12 : FROM alpine AS dev
 ---> f70734b6a266
Step 2/12 : LABEL Version=0.1   MAINTAINER="Guanghong Zuo<ghzuo@fudan.edu.cn>"  description="Docker image for CVTree"
 ---> Using cache
 ---> 4c4fa0e01651
Step 3/12 : RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
 ---> Using cache
 ---> 8804b90fbc7c
Step 4/12 : RUN apk --update add --no-cache g++ make cmake zlib-dev hdf5-dev hdf5-static
 ---> Running in 8847a87b5dbd
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
fetch http://dl-4.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  hdf5-dev (missing):
    required by: world[hdf5-dev]
  hdf5-static (missing):
    required by: world[hdf5-static]
The command '/bin/sh -c apk --update add --no-cache g++ make cmake zlib-dev hdf5-dev hdf5-static' returned a non-zero code: 2

Dockerfile:

## Stage for build cvtree
FROM alpine AS dev
LABEL Version=0.1 \
  MAINTAINER="Guanghong Zuo<ghzuo@fudan.edu.cn>"\
  description="Docker image for CVTree" 

## for develop environment
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk --update add --no-cache g++ make cmake zlib-dev hdf5-dev hdf5-static

## Build cvtree
WORKDIR /root
COPY ./src /root/cvtree/src
COPY ./CMakeLists.txt /root/cvtree/
RUN mkdir cvtree/build/ && cd cvtree/build/ && cmake .. && make 

## Stage for run cvtree 
FROM alpine AS run
COPY --from=dev /root/cvtree/build/bin/* /usr/local/bin/
RUN apk --update add --no-cache libgomp libstdc++

## for workplace
WORKDIR /root/data

我怎樣才能解決我的問題? 任何幫助將不勝感激。

可用軟件包列表中缺少軟件包hdf5-Devhdf5-static ,因此構建失敗。

嘗試使用 alpine edge 社區 docker 圖像:

## for develop environment
RUN apk --update add --no-cache g++ make cmake zlib-dev
RUN apk add hdf5-dev hdf5-static --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community

我運行了以下,它工作正常

RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community hdf5-dev

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM