专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
cpython

stairwaytowonderland/cpython

stairwaytowonderland

基于Debian/Ubuntu的自维护Python镜像,从源码构建CPython,提供标准、性能优化(PGO)、开发扩展及加固等多种变体,适用于容器化工作流的轻量级、可定制Python运行时环境。

下载次数: 0状态:社区镜像维护者:stairwaytowonderland仓库类型:镜像最近更新:22 小时前
轩辕镜像,加速的不只是镜像。点击查看
中文简介
标签下载
镜像标签列表与下载命令
轩辕镜像,加速的不只是镜像。点击查看

🐳 快速参考

  • 维护者:
    https://github.com/andrewhaller
  • 许可证:
    https://github.com/stairwaytowonderland/cpython/blob/main/LICENSE

支持的标签及对应的Docker Hub链接

标签遵循格式 <python-version>[-<变体(ext|perf)>][-<基础镜像引用>]。

ℹ️ 注意:如果基础镜像的变体为 latest,则 <base-image-ref> 指基础镜像的名称;否则,<base-image-ref> 指基础镜像的变体。

示例:

  • 若基础镜像为 ubuntu:latest,则 <base-image-ref> 为 ubuntu(基础镜像名称)。
  • 若基础镜像为 debian:bookworm-slim,则 <base-image-ref> 为 bookworm-slim(基础镜像变体)。

标准镜像

Ubuntu
(ubuntu:latest)
Debian
(debian:bookworm-slim)
Python 版本说明
https://hub.docker.com/layers/stairwaytowonderland/cpython/unstable-ubuntu, https://hub.docker.com/layers/stairwaytowonderland/cpython/unstablehttps://hub.docker.com/layers/stairwaytowonderland/cpython/unstable-bookworm-slim最新不稳定版使用最新的Python不稳定版本
https://hub.docker.com/layers/stairwaytowonderland/cpython/3, https://hub.docker.com/layers/stairwaytowonderland/cpython/ubuntu, https://hub.docker.com/layers/stairwaytowonderland/cpython/latest 🚀https://hub.docker.com/layers/stairwaytowonderland/cpython/bookworm-slim最新稳定版⭐ 默认构建;使用最新的Python稳定版本
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.14-ubuntu, https://hub.docker.com/layers/stairwaytowonderland/cpython/3.14https://hub.docker.com/layers/stairwaytowonderland/cpython/3.14-bookworm-slim3.14标准构建
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.14-perf-ubuntuhttps://hub.docker.com/layers/stairwaytowonderland/cpython/3.14-perf-bookworm-slim3.14PGO优化版(ENABLE_OPTIMIZATIONS=true)
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.14-ext-ubuntuhttps://hub.docker.com/layers/stairwaytowonderland/cpython/3.14-ext-bookworm-slim3.14含扩展工具的开发构建
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.13-ubuntu, https://hub.docker.com/layers/stairwaytowonderland/cpython/3.13https://hub.docker.com/layers/stairwaytowonderland/cpython/3.13-bookworm-slim3.13标准构建
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.12-ubuntu, https://hub.docker.com/layers/stairwaytowonderland/cpython/3.12https://hub.docker.com/layers/stairwaytowonderland/cpython/3.12-bookworm-slim3.12标准构建
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.12-perf-ubuntuhttps://hub.docker.com/layers/stairwaytowonderland/cpython/3.12-perf-bookworm-slim3.12PGO优化版(ENABLE_OPTIMIZATIONS=true)
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.12-ext-ubuntuhttps://hub.docker.com/layers/stairwaytowonderland/cpython/3.12-ext-bookworm-slim3.12含扩展工具的开发构建
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.11-ubuntu, https://hub.docker.com/layers/stairwaytowonderland/cpython/3.11https://hub.docker.com/layers/stairwaytowonderland/cpython/3.11-bookworm-slim3.11标准构建
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.10-ubuntu, https://hub.docker.com/layers/stairwaytowonderland/cpython/3.10https://hub.docker.com/layers/stairwaytowonderland/cpython/3.10-bookworm-slim3.10标准构建

加固镜像

Debian
(dhi.io/debian-base:bookworm-debian12-dev)
Python 版本说明
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.12-bookworm-debian12-dev3.12标准构建
https://hub.docker.com/layers/stairwaytowonderland/cpython/3.14-bookworm-debian12-dev3.14标准构建

快速参考(续)

  • 源码Dockerfile:
    https://github.com/stairwaytowonderland/cpython/blob/main/docker/Dockerfile
  • GitHub仓库:
    https://github.com/stairwaytowonderland/cpython
  • Docker Hub:
    https://hub.docker.com/r/stairwaytowonderland/cpython

支持的平台

  • linux/amd64
  • linux/arm64

基础镜像

所有镜像均基于Debian系基础镜像构建,默认基础镜像为 ubuntu:latest。

基础镜像变体
dhibookworm-debian12-dev
ubuntulatest
debianbookworm-slim

ℹ️ 注意:Dockerfile要求基于Debian系镜像。可通过 IMAGE_NAME 和 VARIANT 构建参数使用其他Debian衍生发行版。

如何使用此镜像

在Dockerfile中使用

将已发布的镜像作为应用镜像的基础:

dockerfile
FROM stairwaytowonderland/cpython:3

WORKDIR /usr/src/myapp

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD [ "python", "./your-daemon-or-script.py" ]

构建镜像

克隆仓库并使用项目根目录提供的构建脚本:

bash
# 构建默认Python版本(最新版),目标为基础阶段
./docker/bin/build.sh cpython .

# 构建特定Python版本
./docker/bin/build.sh cpython \
  --build-arg PYTHON_VERSION=3.14 \
  .

# 构建启用PGO优化的版本
./docker/bin/build.sh cpython \
  --build-arg PYTHON_VERSION=3.14 \
  --build-arg ENABLE_OPTIMIZATIONS=true \
  .

或直接使用docker build构建:

bash
docker build \
  --build-arg PYTHON_VERSION=3.14 \
  --target base \
  -t cpython:3.14-ubuntu \
  -f docker/Dockerfile \
  .

运行Python命令

使用镜像运行一次性Python命令:

bash
docker run --rm stairwaytowonderland/cpython:3.14-ubuntu python3 --version

运行交互式Python shell:

bash
docker run -it --rm stairwaytowonderland/cpython:3.14-ubuntu python3

运行单个Python脚本

bash
docker run --rm \
  -v "$(pwd)":/usr/src/myapp \
  -w /myapp \
  stairwaytowonderland/cpython:3.14-ubuntu \
  python3 your-daemon-or-script.py

镜像变体 - 标准

cpython:<version>-ubuntu

默认镜像。基于 https://hub.docker.com/_/ubuntu 构建。Ubuntu是广泛使用、支持良好的Debian系发行版,拥有庞大的软件包生态,是大多数工作负载的通用选择。

cpython:<version>-bookworm-slim

基于 https://hub.docker.com/_/debian 构建。Debian Bookworm Slim是精简的Debian 12镜像,移除了非必要软件包以减小镜像体积,适合对镜像大小有要求且无需Ubuntu特定工具的场景。

cpython:<version>-perf-<base-image-ref>

性能优化构建,启用配置文件引导优化(PGO)(ENABLE_OPTIMIZATIONS=true)。PGO利用构建过程中收集的运行时分析数据生成更快的CPython二进制文件,推荐用于CPU性能关键的生产工作负载。支持ubuntu和bookworm-slim基础变体。

cpython:<version>-ext-<base-image-ref>

开发导向构建,包含扩展工具(PYTHON_DEV=true)。适用于开发环境和开发容器,需额外构建工具和库的场景。支持ubuntu和bookworm-slim基础变体。

镜像变体 - 加固版(DHI)

cpython:<version>-bookworm-debian12-dev

基于 dhi.io/debian-base:bookworm-debian12-dev 构建。这是项目的默认基础镜像——由dhi.io维护的定制Debian 12(Bookworm)基础镜像,专为Debian系容器工作流设计。预安装常用工具,提供精简、开发友好的基础,适合开发和CI环境。

项目介绍

一个自维护的Python Docker镜像,基于Debian系(Debian或Ubuntu)基础镜像从源码构建https://github.com/python/cpython%E3%80%82%E8%AE%BE%E8%AE%A1%E7%94%A8%E4%BA%8E%E5%AE%B9%E5%99%A8%E5%8C%96%E5%B7%A5%E4%BD%9C%E6%B5%81%E4%B8%AD%E7%9A%84%E8%BD%BB%E9%87%8F%E7%BA%A7%E3%80%81%E5%8F%AF%E5%AE%9A%E5%88%B6Python%E8%BF%90%E8%A1%8C%E6%97%B6%E3%80%82

灵感来源于对生产级、基于Ubuntu的Python"基础"镜像的个人需求。

🌐 https://github.com/stairwaytowonderland/cpython

!https://raw.githubusercontent.com/stairwaytowonderland/cpython/refs/heads/main/docs/assets/beesmall.png

许可证

本项目采用MIT许可证——允许自由使用、修改和分发,需保留署名。

完整许可证文本见https://github.com/stairwaytowonderland/cpython/blob/main/LICENSE%E6%96%87%E4%BB%B6%E3%80%82

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 cpython 镜像标签

docker pull docker.xuanyuan.run/stairwaytowonderland/cpython:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull stairwaytowonderland/cpython:<标签>

更多 cpython 镜像推荐

paketobuildpacks/cpython logo

paketobuildpacks/cpython

paketobuildpacks
暂无描述
100万+ 次下载
6 天前更新
initializbuildpacks/cpython logo

initializbuildpacks/cpython

initializbuildpacks
CPython Buildpack是一个用于安装Python 3到系统路径($PATH)并配置$PYTHONPATH环境变量的构建工具。
1万+ 次下载
1 年前更新
accupara/cpython logo

accupara/cpython

accupara
暂无描述
1万+ 次下载
14 天前更新
koxudaxi/python logo

koxudaxi/python

koxudaxi
lysnikolaou 的 tstrings 分支的 CPython Dockerfile,提供支持标签字符串功能的 Python 环境,可从 Docker Hub 获取并用于开发和测试标签字符串特性。
1万+ 次下载
12 个月前更新
ibmcom/cpython logo

ibmcom/cpython

ibmcom
暂无描述
0 次下载
7 年前更新
ibmcom/cpython-ppc64le logo

ibmcom/cpython-ppc64le

ibmcom
适用于ppc64le架构的cpython Docker镜像
141 次下载
7 年前更新

查看更多 cpython 相关镜像

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

Harbor 镜像源配置

Harbor Proxy Repository 对接专属域名

Portainer 镜像源配置

Portainer Registries 加速拉取

Nexus 镜像源配置

Nexus3 Docker Proxy 内网缓存

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

配置了专属域名后,docker search 为什么会报错?

docker search 限制

Docker Hub 上有的镜像,为什么在轩辕镜像网站搜不到?

站内搜不到镜像

机器不能直连外网时,怎么用 docker save / load 迁镜像?

离线 save/load

docker pull 拉插件报错(plugin v1+json)怎么办?

插件要用 plugin install

WSL 里 Docker 拉镜像特别慢,怎么排查和优化?

WSL 拉取慢

轩辕镜像安全吗?如何用 digest 校验镜像没被篡改?

安全与 digest

第一次用轩辕镜像拉 Docker 镜像,要怎么登录和配置?

新手拉取配置

轩辕镜像合规吗?轩辕镜像的合规是怎么做的?

镜像合规机制

错误码与失败问题

docker pull 提示 manifest unknown 怎么办?

manifest unknown

docker pull 提示 no matching manifest 怎么办?

no matching manifest(架构)

镜像已拉取完成,却提示 invalid tar header 或 failed to register layer 怎么办?

invalid tar header(解压)

Docker pull 时 HTTPS / TLS 证书验证失败怎么办?

TLS 证书失败

Docker pull 时 DNS 解析超时或连不上仓库怎么办?

DNS 超时

docker 无法连接轩辕镜像域名怎么办?

域名连通性排查

Docker 拉取出现 410 Gone 怎么办?

410 Gone 排查

出现 402 或「流量用尽」提示怎么办?

402 与流量用尽

Docker 拉取提示 UNAUTHORIZED(401)怎么办?

401 认证失败

遇到 429 Too Many Requests(请求太频繁)怎么办?

429 限流

docker login 提示 Cannot autolaunch D-Bus,还算登录成功吗?

D-Bus 凭证提示

为什么会出现「单层超过 20GB」或 413,无法加速拉取?

413 与超大单层

账号 / 计费 / 权限

轩辕镜像免费版和专业版有什么区别?

免费版与专业版区别

轩辕镜像支持哪些 Docker 镜像仓库?

支持的镜像仓库

镜像拉取失败还会不会扣流量?

失败是否计费

麒麟 V10 / 统信 UOS 提示 KYSEC 权限不够怎么办?

KYSEC 拦截脚本

如何在轩辕镜像申请开具发票?

申请开票

怎么修改轩辕镜像的网站登录和仓库登录密码?

修改登录密码

如何注销轩辕镜像账户?要注意什么?

注销账户

配置与原理类

写了 registry-mirrors,为什么还是走官方或仍然报错?

mirrors 不生效

怎么用 docker tag 去掉镜像名里的轩辕域名前缀?

去掉域名前缀

如何拉取指定 CPU 架构的镜像(如 ARM64、AMD64)?

指定架构拉取

用轩辕镜像拉镜像时快时慢,常见原因有哪些?

拉取速度原因

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
stairwaytowonderland/cpython
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.