小编fri*_*joe的帖子

Alpine Docker 定义特定的 python 版本 (python3-3.8.7-r0:breaks: world[python3=3.6.9-r3])

当我想构建 Alpine Docker 时,在定义特定的 python 版本时出现错误。

我的 Dockerfile:

FROM python:3-alpine

RUN apk --no-cache add build-base openldap-dev python2-dev 'python3=3.6.9-r3' 'python3-dev=3.6.9-r3'
RUN pip3 install python-ldap sqlalchemy requests
ADD ucs-root-ca.crt /usr/local/share/ca-certificates/foo.crt
RUN chmod 644 /usr/local/share/ca-certificates/foo.crt && update-ca-certificates

COPY templates ./templates
COPY api.py filedb.py syncer.py ./

VOLUME [ "/db" ]
VOLUME [ "/conf/dovecot" ]
VOLUME [ "/conf/sogo" ]

ENTRYPOINT [ "python3", "syncer.py" ]
Run Code Online (Sandbox Code Playgroud)

当我想构建我的 dockerfile 时出现以下错误:

ERROR: unable to select packages:
  python3-3.8.7-r0:
    breaks: world[python3=3.6.9-r3]
    satisfies: python3-dev-3.8.7-r0[python3=3.8.7-r0]
  python3-dev-3.8.7-r0:
    breaks: world[python3-dev=3.6.9-r3]
The command '/bin/sh -c apk …
Run Code Online (Sandbox Code Playgroud)

python python-3.x docker alpine-linux

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

alpine-linux ×1

docker ×1

python ×1

python-3.x ×1