
基于Alpine的多阶段构建Docker化版本的https://github.com/python/mypy%E3%80%82%E8%AF%A5%E9%95%9C%E5%83%8F%E6%AF%8F%E6%99%9A%E9%92%88%E5%AF%B9%E5%A4%9A%E4%B8%AA%E7%A8%B3%E5%AE%9A%E7%89%88%E6%9C%AC%E6%9E%84%E5%BB%BA%EF%BC%8C%E5%B9%B6%E6%8E%A8%E9%80%81%E5%88%B0Dockerhub%EF%BC%8C%E6%94%AF%E6%8C%81%E5%A4%9A%E7%A7%8D%E6%9E%B6%E6%9E%84%EF%BC%8C%E9%80%82%E5%90%88%E5%9C%A8CI%E7%8E%AF%E5%A2%83%E4%B8%AD%E5%AE%9E%E7%8E%B0%E5%8F%AF%E9%87%8D%E7%8E%B0%E7%9A%84Python%E4%BB%A3%E7%A0%81%E9%9D%99%E6%80%81%E7%B1%BB%E5%9E%8B%E6%A3%80%E6%9F%A5%E3%80%82
以下标签为滚动发布,每晚构建更新:
| Docker标签 | Git引用 | mypy版本 | Python版本 | 支持架构 |
|---|---|---|---|---|
latest | master | latest | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.10 | master | latest | 3.10 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.9 | master | latest | 3.9 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.8 | master | latest | 3.8 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.7 | master | latest | 3.7 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.6 | master | latest | 3.6 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0 | master | 0.x.x | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.10 | master | 0.x.x | 3.10 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.9 | master | 0.x.x | 3.9 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.8 | master | 0.x.x | 3.8 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.7 | master | 0.x.x | 3.7 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.6 | master | 0.x.x | 3.6 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
以下标签为一次性构建,用于可重现构建(<tag>需替换为具体git标签):
| Docker标签 | Git引用 | mypy版本 | Python版本 | 支持架构 |
|---|---|---|---|---|
latest-<tag> | git: <tag> | latest | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.10-<tag> | git: <tag> | latest | 3.10 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.9-<tag> | git: <tag> | latest | 3.9 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.8-<tag> | git: <tag> | latest | 3.8 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.7-<tag> | git: <tag> | latest | 3.7 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
latest-py3.6-<tag> | git: <tag> | latest | 3.6 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-<tag> | git: <tag> | 0.x.x | latest | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.10-<tag> | git: <tag> | 0.x.x | 3.10 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.9-<tag> | git: <tag> | 0.x.x | 3.9 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.8-<tag> | git: <tag> | 0.x.x | 3.8 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
0-py3.6-<tag> | git: <tag> | 0.x.x | 3.6 | amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x |
容器工作目录为**/data/**,需将本地目录挂载至此路径以访问待检查的Python文件。
bash# Linux, Mac, Windows (Powershell) docker run --rm -v $(pwd):/data cytopia/mypy main.py # Windows (cmd) docker run --rm -v %cd%:/data cytopia/mypy main.py
bash# 使用Python 3.9版本的mypy docker run --rm -v $(pwd):/data cytopia/mypy:latest-py3.9 main.py # 使用固定版本 docker run --rm -v $(pwd):/data cytopia/mypy:latest-v1.2.3 main.py
以下为其他CI友好的Docker化代码检查工具:
| GitHub | DockerHub | 类型 | 描述 |
|---|---|---|---|
| https://github.com/cytopia/awesome-ci | https://hub.docker.com/r/cytopia/awesome-ci | 基础 | 用于git、文件和静态源代码分析的工具 |
| https://github.com/cytopia/docker-file-lint | https://hub.docker.com/r/cytopia/file-lint | 基础 | 基础源代码分析 |
| https://github.com/cytopia/docker-linkcheck | https://hub.docker.com/r/cytopia/file-lint | 基础 | 搜索文件中的URL并验证其HTTP状态码 |
| https://github.com/cytopia/docker-ansible | https://hub.docker.com/r/cytopia/ansible | Ansible | 多个版本和类型的Ansible |
| https://github.com/cytopia/docker-ansible-lint | https://hub.docker.com/r/cytopia/ansible-lint | Ansible | 检查Ansible代码 |
| https://github.com/cytopia/docker-gofmt | https://hub.docker.com/r/cytopia/gofmt | Go | 格式化Go源代码 [1] |
| https://github.com/cytopia/docker-eslint | https://hub.docker.com/r/cytopia/eslint | JavaScript | 检查JavaScript代码 |
| https://github.com/cytopia/docker-jsonlint | https://hub.docker.com/r/cytopia/jsonlint | JSON | 检查JSON文件 [1] |
| https://github.com/cytopia/docker-kubeval | https://hub.docker.com/r/cytopia/kubeval | K8s | 检查Kubernetes文件 |
| https://github.com/cytopia/docker-phpcs | https://hub.docker.com/r/cytopia/phpcs | PHP | PHP代码嗅探器 |
| https://github.com/cytopia/docker-black | https://hub.docker.com/r/cytopia/black | Python | Python代码格式化工具 |
| https://github.com/cytopia/docker-pylint | https://hub.docker.com/r/cytopia/pylint | Python | Python代码质量检查器 |
[1] 使用shell包装器提供原始项目不具备的增强功能
MIT许可证
版权所有 (c) 2020 https://github.com/cytopia
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务