Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docker build:;不可满足约束_Docker_Alpine - Fatal编程技术网

Docker build:;不可满足约束

Docker build:;不可满足约束,docker,alpine,Docker,Alpine,我正在尝试设置一个可以运行CVTree 3.0()的docker映像。 然而,我得到了这个错误: 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>" descriptio

我正在尝试设置一个可以运行CVTree 3.0()的docker映像。 然而,我得到了这个错误:

    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
将生成上下文发送到Docker守护进程206.1MB
步骤1/12:从alpine AS开发
--->f70734b6a266
步骤2/12:标签版本=0.1 MAINTAINER=“Guanghong Zo”description=“CVTree的Docker图像”
--->使用缓存
--->4c4fa0e01651
步骤3/12:运行“echo”http://dl-4.alpinelinux.org/alpine/edge/testing“>>/etc/apk/repositories
--->使用缓存
--->8804b90fbc7c
步骤4/12:运行apk--更新添加--无缓存g++使cmake zlib dev hdf5 dev hdf5静态
--->在8847a87b5dbd中运行
取来http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
取来http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
取来http://dl-4.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
错误:不可满足的约束:
hdf5开发人员(缺失):
所需人员:世界[hdf5开发人员]
hdf5静态(缺失):
所需人员:world[hdf5静态]
命令“/bin/sh-capk--update add--no cache g++make cmake zlib dev hdf5 dev hdf5 static”返回一个非零代码: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
##构建cvtree的阶段
来自阿尔卑斯山的德夫
标签版本=0.1\
维护者=“左广红”\
description=“CVTree的Docker映像”
##开发环境
“运行回声”http://dl-4.alpinelinux.org/alpine/edge/testing“>>/etc/apk/repositories
运行apk--更新添加--无缓存g++使cmake zlib dev hdf5 dev hdf5静态
##构建cvtree
WORKDIR/root
复制./src/root/cvtree/src
复制./CMakeLists.txt/root/cvtree/
运行mkdir-cvtree/build/&&cd-cvtree/build/&&cmake..&&制作
##运行cvtree的阶段
从阿尔卑斯山出发
复制--from=dev/root/cvtree/build/bin/*/usr/local/bin/
运行apk--更新添加--无缓存libgomp libstdc++
##工作场所
WORKDIR/root/data

我怎样才能解决我的问题?非常感谢您的帮助。

可用软件包列表中缺少程序包
hdf5 Dev
hdf5 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

可用包列表中缺少包
hdf5 Dev
hdf5 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

我运行了以下程序,效果很好

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

问题似乎是apk在其可用软件包列表中找不到hdf5 Dev和hdf5 static软件包,因此无法安装它。检查apk软件包库,看看是否可以在stable或edge alpine版本中找到它。下面是一个类似问题的链接,可能会有所帮助:在edge alpine版本中可以找到hdf5 Dev和hdf5 static coudle软件包。一周前,当我使用另一台计算机时,我成功构建了该映像。问题似乎是apk在其可用软件包列表中找不到hdf5 Dev和hdf5 static软件包,因此无法安装它。检查apk软件包库,看看是否可以在stable或edge alpine版本中找到它。下面是一个类似问题的链接,可能会有所帮助:在edge alpine版本中可以找到hdf5 Dev和hdf5 static coudle包。一周前,我在使用另一台计算机时成功构建了该映像。抱歉,它不起作用。我收到了相同的错误和另一个错误::网络错误(检查Internet连接和防火墙)警告:忽略APKINDEX.b53994b4.tar.gz:没有这样的文件或目录该错误与您的网络有关
网络错误(检查Internet连接和防火墙)
抱歉,它不起作用。我收到了相同的错误和另一个错误::网络错误(检查Internet连接和防火墙)警告:忽略APKINDEX.b53994b4.tar.gz:没有这样的文件或目录此错误与您的网络有关
网络错误(检查Internet连接和防火墙)