Docker Alpine Linux python(缺失) [英] Docker Alpine Linux python (missing)

查看:37
本文介绍了Docker Alpine Linux python(缺失)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从 GitLab 部署我的容器的管道.上次部署是在 5 天前,没有出现任何问题.今天我部署它并收到以下错误:

I have a pipeline which deploys my container from GitLab. Last deployment was 5 days ago and went without any problems. Today I deploy it and get the following error:

$ apk add --no-cache curl python py-pip
 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
 ERROR: unsatisfiable constraints:
   python (missing):
     required by: world[python]

我的工作定义是:

my-deploy:
  type: my-deploy
  image: docker:stable
  script:
    - apk update
    - apk add --no-cache curl python py-pip <-- Here the erorr happens
    ...

推荐答案

来自 this Docker 存储库中的问题:

From this issue on the Docker's repo:

这是破碎的";将我们的基地从 alpine:3.11 更新为 alpine:3.12

This was "broken" while updating our base from alpine:3.11 to alpine:3.12

为了修复它,您需要直接指定 Python 的版本,例如:

In order to fix it you need to specify the version of Python directly, e.g.:

apk add python2
// or
apk add python3

这篇关于Docker Alpine Linux python(缺失)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆