Skip to content

Conversation

@pablintino
Copy link
Contributor

Summary

Adds DockerAdditionalTrustedBundle field to SystemContext for providing additional PEM-encoded CA certificates when connecting to Docker registries.

Use case

Useful when host-specific certificates are configured but a common CA is needed across all registry connections.

Changes

  • Added DockerAdditionalTrustedBundle field to SystemContext
  • Appends provided certificates to TLS RootCAs pool in newDockerClient()

Introduces a new SystemContext field DockerAdditionalTrustedBundle to allow
callers to provide additional PEM-encoded certificates that should be trusted
when connecting to Docker registries. This is useful for environments with
custom or internal certificate authorities, particularly when host-specific
certificates are provided but a common CA is required across all hosts.

Signed-off-by: Pablo Rodriguez Nava <git@amail.pablintino.com>
@github-actions github-actions bot added the image Related to "image" package label Jan 16, 2026
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Jan 16, 2026
@podmanbot
Copy link

✅ A new PR has been created in buildah to vendor these changes: containers/buildah#6642

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

There is a parallel TLS setting discussion motivated by OpenShift needs, so this needs to be coordinated with that — probably land afterwards or at the very least it needs to not prevent the other work.

}

// If the non-host-specific trust bundle is given add it to the RootCAs pool
if sys.DockerAdditionalTrustedBundle != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sys can be nil.


// If the non-host-specific trust bundle is given add it to the RootCAs pool
if sys.DockerAdditionalTrustedBundle != "" {
tlsClientConfig.RootCAs.AppendCertsFromPEM([]byte(sys.DockerAdditionalTrustedBundle))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether the input wouldn’t be better as native Go Certificate, not forcing the client to serialize to text if the input is not originally text.

I don’t have a strong opinion at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

image Related to "image" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants