包含常用构建依赖项,用于安装各种模块(如gems)的Docker镜像

689 次收藏下载次数: 0状态:Docker 官方镜像维护者:Docker 官方镜像仓库类型:镜像最近更新:1 天前
下载命令
点击查看

buildpack-deps 镜像文档

概述

buildpack-deps 镜像在设计理念上类似于 https://github.com/heroku/stack-images/blob/master/bin/cedar.sh,包含大量开发所需的"头文件"包,适用于 Ruby Gems、PyPI 模块等各类依赖的编译安装。例如,使用 buildpack-deps 可以在任意应用目录中执行 bundle install,而无需预先知晓构建依赖模块是否需要 ssl.h 等头文件。

核心功能与特性

完整版本(主标签)

包含大量开发依赖包,支持绝大多数 gem install、npm install、pip install 等命令无需额外安装头文件即可成功执行。

curl 变体

基于基础镜像,仅包含 curl、wget 和 ca-certificates 包。适用于需下载文件但无需版本控制的场景(如 Java JRE 环境下载 JAR 包)。

scm 变体

基于 curl 变体,额外包含多种版本控制工具:bzr、git、hg 和 svn(不含 cvs)。适用于需下载文件且需版本控制的场景(如 Java JDK 环境中检出代码)。

支持的标签

Debian 系列

基础版本完整版本标签curl 变体标签scm 变体标签Dockerfile 链接
Trixie (stable)trixie, stable, latesttrixie-curl, stable-curl, curltrixie-scm, stable-scm, scmhttps://github.com/docker-library/buildpack-deps/blob/1f4fe499c668d9a2e1578aa8db4f0b2d***cf5/debian/trixie/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/1f4fe499c668d9a2e1578aa8db4f0b2d***cf5/debian/trixie/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/1f4fe499c668d9a2e1578aa8db4f0b2d***cf5/debian/trixie/scm/Dockerfile
Bookworm (oldstable)bookworm, oldstablebookworm-curl, oldstable-curlbookworm-scm, oldstable-scmhttps://github.com/docker-library/buildpack-deps/blob/d0ecd4b7313e9bc6b00d9a4fe62ad5787bc197ae/debian/bookworm/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/3e18c3af1f5dce6a48abf036857f9097b6bd79cc/debian/bookworm/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/d0ecd4b7313e9bc6b00d9a4fe62ad5787bc197ae/debian/bookworm/scm/Dockerfile
Bullseye (oldoldstable)bullseye, oldoldstablebullseye-curl, oldoldstable-curlbullseye-scm, oldoldstable-scmhttps://github.com/docker-library/buildpack-deps/blob/d0ecd4b7313e9bc6b00d9a4fe62ad5787bc197ae/debian/bullseye/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/93d6db0797f91ab674535553b7e0e762941a02d0/debian/bullseye/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/d0ecd4b7313e9bc6b00d9a4fe62ad5787bc197ae/debian/bullseye/scm/Dockerfile
Forky (testing)forky, testingforky-curl, testing-curlforky-scm, testing-scmhttps://github.com/docker-library/buildpack-deps/blob/6fbd1fd6aa***b10f11a97c31b9da1ac09db76/debian/forky/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/6fbd1fd6aa***b10f11a97c31b9da1ac09db76/debian/forky/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/6fbd1fd6aa***b10f11a97c31b9da1ac09db76/debian/forky/scm/Dockerfile
Sid (unstable)sid, unstablesid-curl, unstable-curlsid-scm, unstable-scmhttps://github.com/docker-library/buildpack-deps/blob/2b3a8b7d1f8875865034be3bab98ddd737e37d5e/debian/sid/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/2b3a8b7d1f8875865034be3bab98ddd737e37d5e/debian/sid/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/2b3a8b7d1f8875865034be3bab98ddd737e37d5e/debian/sid/scm/Dockerfile

Ubuntu 系列

基础版本完整版本标签curl 变体标签scm 变体标签Dockerfile 链接
Noble (24.04)noble, 24.04noble-curl, 24.04-curlnoble-scm, 24.04-scmhttps://github.com/docker-library/buildpack-deps/blob/60dc5f9555c521de086b2f5770514faf69ee2cc4/ubuntu/noble/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/60dc5f9555c521de086b2f5770514faf69ee2cc4/ubuntu/noble/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/60dc5f9555c521de086b2f5770514faf69ee2cc4/ubuntu/noble/scm/Dockerfile
Jammy (22.04)jammy, 22.04jammy-curl, 22.04-curljammy-scm, 22.04-scmhttps://github.com/docker-library/buildpack-deps/blob/d0ecd4b7313e9bc6b00d9a4fe62ad5787bc197ae/ubuntu/jammy/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/93d6db0797f91ab674535553b7e0e762941a02d0/ubuntu/jammy/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/d0ecd4b7313e9bc6b00d9a4fe62ad5787bc197ae/ubuntu/jammy/scm/Dockerfile
Plucky (25.04)plucky, 25.04plucky-curl, 25.04-curlplucky-scm, 25.04-scmhttps://github.com/docker-library/buildpack-deps/blob/ab3ae04e943ecb240a9691dfa1de219b4a3e32a0/ubuntu/plucky/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/ab3ae04e943ecb240a9691dfa1de219b4a3e32a0/ubuntu/plucky/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/ab3ae04e943ecb240a9691dfa1de219b4a3e32a0/ubuntu/plucky/scm/Dockerfile
Questing (25.10)questing, 25.10questing-curl, 25.10-curlquesting-scm, 25.10-scmhttps://github.com/docker-library/buildpack-deps/blob/99e7dc24c50c0a7be371ea9e6aed6134ce4cbfeb/ubuntu/questing/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/99e7dc24c50c0a7be371ea9e6aed6134ce4cbfeb/ubuntu/questing/curl/Dockerfile、https://github.com/docker-library/buildpack-deps/blob/99e7dc24c50c0a7be371ea9e6aed6134ce4cbfeb/ubuntu/questing/scm/Dockerfile

使用场景与适用范围

  • 语言栈基础镜像:作为 Ruby、Python、Node.js 等语言栈镜像的基础,提供编译依赖。
  • 模块安装场景:需执行 gem install、npm install、pip install 等命令,且预先未知依赖的开发头文件时。
  • 精简需求场景:仅需下载功能(curl 变体)或版本控制功能(scm 变体)时,减少镜像体积。

使用方法

基础使用

该镜像设计为语言栈镜像的基础层,通常作为 FROM 指令的基础镜像:

dockerfile
# 使用完整版本作为 Ruby 镜像基础
FROM docker.xuanyuan.run/buildpack-deps:latest
RUN apt-get update && apt-get install -y ruby && rm -rf /var/lib/apt/lists/*

变体使用示例

curl 变体:下载文件

bash
docker run --rm docker.xuanyuan.run/buildpack-deps:curl wget https://example.com/file.tar.gz

scm 变体:克隆代码仓库

bash
docker run --rm docker.xuanyuan.run/buildpack-deps:scm git clone https://github.com/example/repo.git

完整版本:安装 Ruby Gems

bash
docker run -v $(pwd):/app --rm docker.xuanyuan.run/buildpack-deps:latest sh -c "cd /app && gem install bundler && bundle install"

维护与支持

  • 维护者:https://github.com/docker-library/buildpack-deps
  • 获取帮助:https://dockr.ly/comm-slack、Server Fault、https://unix.stackexchange.com/help/on-topic、https://stackoverflow.com/help/on-topic
  • 支持架构:amd64、arm32v5、arm32v7、arm64v8、i386、mips64le、ppc64le、riscv64、s390x
  • 镜像更新:https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fbuildpack-deps
  • 问题反馈:https://github.com/docker-library/buildpack-deps/issues

许可证

镜像中软件的许可证信息请参见 https://www.debian.org/social_contract#guidelines。
Docker 镜像可能包含其他软件(如 Bash 等基础发行版组件),其许可证可能不同。
额外许可证信息可在 https://github.com/docker-library/repo-info/tree/master/repos/buildpack-deps 中找到。
使用前请确保遵守所有包含软件的许可证要求。

镜像拉取方式

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

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

docker pull docker.xuanyuan.run/buildpack-deps:<标签>

DockerHub 原生拉取命令

docker pull buildpack-deps:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告