[PR #1557] [MERGED] feat: add support for building docker actions with private registries #2001

Closed
opened 2026-03-01 21:53:36 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1557
Author: @ZauberNerd
Created: 1/12/2023
Status: Merged
Merged: 1/12/2023
Merged by: @mergify[bot]

Base: masterHead: docker-build-authenticated


📝 Commits (1)

  • 0aff358 feat: add support for building docker actions with private registries

📊 Changes

2 files changed (+25 additions, -3 deletions)

View changed files

📝 pkg/container/docker_auth.go (+21 -0)
📝 pkg/container/docker_build.go (+4 -3)

📄 Description

This commit adds a new LoadDockerAuthConfigs function, which loads all registry auths that are configured on the host and sends them with the build command to the docker daemon.

This is needed in case act builds a docker action and the images referenced in that docker action are located on private registries or otherwise require authentication (e.g. to get a higher rate limit).

The code is adapted from how the docker cli works: github.com/docker/cli@257ff41304/cli/command/image/build.go (L323-L332)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1557 **Author:** [@ZauberNerd](https://github.com/ZauberNerd) **Created:** 1/12/2023 **Status:** ✅ Merged **Merged:** 1/12/2023 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `docker-build-authenticated` --- ### 📝 Commits (1) - [`0aff358`](https://github.com/nektos/act/commit/0aff358a10292f90c51651b2092ca0c766443b21) feat: add support for building docker actions with private registries ### 📊 Changes **2 files changed** (+25 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `pkg/container/docker_auth.go` (+21 -0) 📝 `pkg/container/docker_build.go` (+4 -3) </details> ### 📄 Description This commit adds a new `LoadDockerAuthConfigs` function, which loads all registry auths that are configured on the host and sends them with the build command to the docker daemon. This is needed in case act builds a docker action and the images referenced in that docker action are located on private registries or otherwise require authentication (e.g. to get a higher rate limit). The code is adapted from how the docker cli works: https://github.com/docker/cli/blob/257ff41304bf121bdf1acdf00a1c7a896ed038d1/cli/command/image/build.go#L323-L332 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:53:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#2001
No description provided.