# 使用 Homebrew, MacPorts, apk 安装 docker-credential-helper-ecr

查看 docker-credential-helper-ecr 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:docker-credential-helper-ecr
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install docker-credential-helper-ecr
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install docker-credential-helper-ecr
```

  证据: MacPorts ports tree: sysutils/docker-credential-helper-ecr/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add docker-credential-ecr-login
```

  证据: Alpine Linux edge package indexes: docker-credential-ecr-login from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

## 软件包事实

- **软件包键:** brew:docker-credential-helper-ecr
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/docker-credential-helper-ecr>
- **版本:** 0.12.0
- **来源摘要:** Docker Credential Helper for Amazon ECR
- **主页:** <https://github.com/awslabs/amazon-ecr-credential-helper>
- **仓库:** <https://github.com/awslabs/amazon-ecr-credential-helper>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/awslabs/amazon-ecr-credential-helper/archive/refs/tags/v0.12.0.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- docker-credential-ecr-login (cli)
- docker-credential-ecr-login (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.12.0
- 本地数据: OK
- 上游仓库: https://github.com/awslabs/amazon-ecr-credential-helper
- 检测到的最新版本: v0.12.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

Amazon ECR Docker Credential Helper is the Docker credential helper for Amazon Elastic Container Registry. It lets Docker fetch ECR authentication through AWS credentials instead of requiring users or automation to run docker login for ECR registries.

### 项目历史

The project is maintained under awslabs and implements Docker's credential-helper protocol as docker-credential-ecr-login. Its README describes the helper as a bridge between Docker, Amazon ECR, and the normal AWS credential chain, including shared credentials files, environment variables, EC2 and ECS roles, assumed roles, credential_process, and web identity support.

The changelog shows an initial 0.1.0 release in 2018, followed by endpoint and credential-chain work: FIPS endpoints in 0.2.0, PrivateLink endpoints in 0.3.0, assumed-role chaining and IRSA support in 0.4.0, ECR Public and IMDSv2 support in 0.5.0, AWS SSO and Apple Silicon support in 0.6.0, and later support for isolated, IPv6, and dual-stack ECR endpoint patterns.

### 采用历史

The README documents installation paths across Amazon Linux, Debian, Ubuntu, Arch, Alpine, macOS Homebrew, MacPorts, Windows releases, mise, and Go source installs. That distribution spread reflects its role as a small but standard glue package for CI systems, developer laptops, and hosts that pull private ECR images.

### 使用方式

Users place docker-credential-ecr-login on PATH and set Docker's credsStore or per-registry credHelpers entry to ecr-login. After that, docker pull and docker push against private or public ECR registries use AWS credentials automatically, with optional AWS_PROFILE selection and local helper cache controls.

### 为什么软件包爱好者会关心

For package maintainers, this package is interesting because it connects three packaging worlds: Docker's external credential-helper interface, AWS's credential provider chain, and distro or language package managers. A broken helper can make otherwise-correct Docker and AWS installs unable to pull private images, so version and path details matter.

### 时间线

- 2018: v0.1.0 tagged as the initial release.
- 2019: Debian and Amazon Linux packaging tags appear in the upstream repository.
- 2021: v0.5.0 adds ECR Public and IMDSv2 support.
- 2021: v0.6.0 adds AWS SSO, EC2 metadata role assumption, and Apple Silicon support.
- 2024: v0.8.0 adds C2S endpoint pattern support and experimental Windows ARM binaries.
- 2026: v0.12.0 adds dual-stack ECR public endpoint support and SHA256 cache keys.

### Related projects

- The project is directly related to Docker's docker-credential-helpers suite, Amazon ECR, the AWS CLI and SDK credential chain, Amazon ECS and EC2 IAM roles, and Kubernetes IRSA workflows.

### 来源

- <https://github.com/awslabs/amazon-ecr-credential-helper#readme>
- <https://github.com/awslabs/amazon-ecr-credential-helper/blob/main/CHANGELOG.md>
- <https://github.com/awslabs/amazon-ecr-credential-helper/releases>
- <https://github.com/awslabs/amazon-ecr-credential-helper/tags>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /home/<username>/.docker/config.json, /root/.docker/config.json
- Unix: ~/.docker/config.json, ~/.aws/config
- Windows: C:\Users\<username>\.docker\config.json, C:\Windows\System32\config\systemprofile\.docker\config.json

## Credential files

- Unix: ~/.aws/credentials
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** docker-credential-helper-ecr
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- MacPorts - docker-credential-helper-ecr: normalized package name match | MacPorts ports tree: sysutils/docker-credential-helper-ecr/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- apk - docker-credential-ecr-login - 0.12.0-r4: installed executable or alias match | Alpine Linux edge package indexes: docker-credential-ecr-login from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Credential helper for Docker to use the AWS Elastic Container Registry | https://github.com/awslabs/amazon-ecr-credential-helper
- apk - docker-credential-ecr-login-doc - 0.12.0-r4: installed executable or alias match | Alpine Linux edge package indexes: docker-credential-ecr-login-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Credential helper for Docker to use the AWS Elastic Container Registry (documentation) | https://github.com/awslabs/amazon-ecr-credential-helper


## 相关链接

- [Cloud CLI packages](https://pkg.so/zh-hans/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [docker-credential-helper](https://pkg.so/zh-hans/brew/docker-credential-helper/) - Shares pkgdb curated category or tags: cli, containers, credentials, developer-tools, docker.
- [docker-machine-driver-vultr](https://pkg.so/zh-hans/brew/docker-machine-driver-vultr/) - Shares pkgdb curated category or tags: cli, cloud, containers, developer-tools.
- [docker](https://pkg.so/zh-hans/brew/docker/) - Shares pkgdb curated category or tags: cli, containers, developer-tools, docker.
- [docker-compose](https://pkg.so/zh-hans/brew/docker-compose/) - Shares pkgdb curated category or tags: cli, containers, developer-tools, docker.
- [docker-buildx](https://pkg.so/zh-hans/brew/docker-buildx/) - Shares pkgdb curated category or tags: cli, containers, developer-tools, docker.
- [lazydocker](https://pkg.so/zh-hans/brew/lazydocker/) - Shares pkgdb curated category or tags: cli, containers, developer-tools, docker.
- [docker-machine](https://pkg.so/zh-hans/brew/docker-machine/) - Shares pkgdb curated category or tags: cli, containers, developer-tools, docker.
- [devcontainer](https://pkg.so/zh-hans/brew/devcontainer/) - Shares pkgdb curated category or tags: cli, containers, developer-tools, docker.
- [docker-clean](https://pkg.so/zh-hans/brew/docker-clean/) - Package names and metadata indicate a similar tool family. Shared terms: cli, containers, developer, developer-tools, docker.

## Combined YAML source

View the package source record on GitHub. [combined/docker-credential-helper-ecr.yml](https://github.com/mxcl/pkgdb/blob/main/combined/docker-credential-helper-ecr.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
