Docker:未找到Alpine linux社区软件包

时间:2019-03-02 13:58:54

标签: docker pip docker-compose repository alpine

我正在尝试使用以下Dockerfile创建一个容器:

FROM python:3.6-alpine

RUN apk add --update alpine-sdk make gcc python3-dev python-dev libxslt-dev \
     libxml2-dev libc-dev openssl-dev libffi-dev zlib-dev py-pip openssh \
     py3-lxml@main py3-numpy@community \
     mariadb-dev libjpeg-dev zlib1g-dev && rm -rf /var/cache/apk/*

我添加了基于this advicepy3-lxml@mainpy3-numpy@community作为numpylxml的建筑轮子,需要一些时间。

我使用了官方Alpine repo page上指定的软件包名称,但是出现以下错误:

WARNING: The repository tag for world dependency 'py3-lxml@main' does not exist
WARNING: The repository tag for world dependency 'py3-numpy@community' does not exist*

那是为什么,我如何获得那些包裹?

1 个答案:

答案 0 :(得分:1)

为了具体解决此问题,

WARNING: The repository tag for world dependency 'py3-lxml@main' does not exist
WARNING: The repository tag for world dependency 'py3-numpy@community' does not exist

您需要更新此处/etc/apk/repositories中的存储库文件 除非您不想从@community命令中删除@mainapk add标记,否则它们将执行以下操作:

@main http://dl-cdn.alpinelinux.org/alpine/v3.9/main
@community http://dl-cdn.alpinelinux.org/alpine/v3.9/community

请不要忘记将COPY的内容/etc/apk/repositories