简体   繁体   English

为什么官方docker python映像包含GPG_KEY环境变量?

[英]Why do the official docker python images include a GPG_KEY environment variable?

Why is this included? 为什么包括在内? Is there any harm in unsetting it in images that inherit from this one? 在从该图像继承的图像中取消设置是否有任何危害?

If you are just inheriting from the image, ie FROM python:3.5 then you don't need to worry about the GPG_KEY variable. 如果您只是从图像继承,即FROM python:3.5则无需担心GPG_KEY变量。

If you are customizing the Python image's official dockerfile, then do not unset or reset these values, as it will break the building of the image. 如果要自定义Python映像的官方dockerfile,请不要取消设置或重置这些值,因为这会破坏映像的构建。


It is included so that the downloaded archives for Python source can be verified as genuine. 它被包括在内,以便可以将已下载的Python源档案存档验证为真实。

It is normally used when building the image, so that when you tag it with a specific version, that version is downloaded and verified before being built. 通常在构建映像时使用它,因此,当您使用特定版本标记它时,将在构建之前下载并验证该版本。

The value are set in the update.sh script : 该值在update.sh脚本中设置:

declare -A gpgKeys=(
    # gpg: key 18ADD4FF: public key "Benjamin Peterson <benjamin@python.org>" imported
    [2.7]='C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF'
    # https://www.python.org/dev/peps/pep-0373/#release-manager-and-crew

    # gpg: key F73C700D: public key "Larry Hastings <larry@hastings.org>" imported
    [3.4]='97FC712E4C024BBEA48A61ED3A5CA953F73C700D'
    # https://www.python.org/dev/peps/pep-0429/#release-manager-and-crew

    # gpg: key F73C700D: public key "Larry Hastings <larry@hastings.org>" imported
    [3.5]='97FC712E4C024BBEA48A61ED3A5CA953F73C700D'
    # https://www.python.org/dev/peps/pep-0478/#release-manager-and-crew

    # gpg: key AA65421D: public key "Ned Deily (Python release signing key) <nad@acm.org>" imported
    [3.6]='0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D'
    # https://www.python.org/dev/peps/pep-0494/#release-manager-and-crew

    # gpg: key AA65421D: public key "Ned Deily (Python release signing key) <nad@acm.org>" imported
    [3.7]='0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D'
    # https://www.python.org/dev/peps/pep-0494/#release-manager-and-crew
)

This script then updates the various individual dockerfiles that in the end are used to build the actual image. 然后,该脚本会更新各种单独的泊坞窗文件,最后将它们用于构建实际映像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM