Docker Alpine Linux python (missing)

前端 未结 3 2028
暗喜
暗喜 2020-12-10 01:27

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:

相关标签:
3条回答
  • 2020-12-10 01:52

    I've fix following this https://gitlab.alpinelinux.org/alpine/aports/-/issues/11605

    Updating your code to install python3:

    before_script:
    - apk add --update --no-cache curl jq py3-configobj py3-pip py3-setuptools python3 python3-dev
    
    0 讨论(0)
  • 2020-12-10 02:00

    From this issue on the Docker's repo:

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

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

    apk add python2
    // or
    apk add python3
    
    0 讨论(0)
  • 2020-12-10 02:11

    Could you try this command?

    apk add --update --no-cache curl py-pip
    

    It will install python3 automatically with pip.

    My understanding is, python (version 2) has been decommissioned from latest alpine packages.

    0 讨论(0)
提交回复
热议问题