Skip to content

image/docker: use unified configfile search for cert directories#746

Open
jankaluza wants to merge 1 commit intocontainers:mainfrom
jankaluza:certs.d
Open

image/docker: use unified configfile search for cert directories#746
jankaluza wants to merge 1 commit intocontainers:mainfrom
jankaluza:certs.d

Conversation

@jankaluza
Copy link
Copy Markdown
Member

Switch dockerCertDir to use the new
configfile.ContainersResourceDirs for resolving certificate directories.

@github-actions github-actions Bot added storage Related to "storage" package image Related to "image" package labels Apr 7, 2026
Comment thread storage/pkg/configfile/parse.go Outdated
Comment thread storage/pkg/configfile/parse.go Outdated
Comment thread storage/pkg/configfile/parse.go Outdated
Comment thread storage/pkg/configfile/parse.go Outdated
Comment thread image/docker/docker_client.go Outdated
@jankaluza
Copy link
Copy Markdown
Member Author

@Luap99 , thanks for the review :-). I will change the code once we finish discussions for all the suggested changes.

Copy link
Copy Markdown
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.

(Just a random note for now)

Comment thread image/docker/docker_client.go
@Luap99 Luap99 added the podman 6 breaking changes that should go only into podman 6 only label Apr 21, 2026
Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

With the latest GetSearchPaths() API do we even get anything new from this ContainersResourceDirs?

I guess the simple thing is to just reuse GetSearchPaths() and not do any pkg/configfile changes?

Comment thread storage/pkg/configfile/parse.go Outdated
Comment thread storage/pkg/configfile/parse.go Outdated
Comment thread storage/pkg/configfile/parse.go Outdated
@jankaluza
Copy link
Copy Markdown
Member Author

@Luap99 , I rewrote it to use GetSearchPaths, but I had to introduce File.ExtraDropInDirectories to inject the /etc/docker/certs.d between XDG directories and /etc directories.

Comment thread image/docker/docker_client.go Outdated
Comment thread storage/pkg/configfile/parse.go Outdated
Copy link
Copy Markdown
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.

Looks reasonable overall.

Comment thread image/docs/containers-certs.d.5.md
Comment thread image/docker/docker_client_test.go Outdated
Comment thread image/docker/docker_client.go Outdated
Comment thread storage/pkg/configfile/parse_test.go Outdated
Comment thread storage/pkg/configfile/parse.go Outdated
Comment thread storage/pkg/configfile/parse.go Outdated
Switch `dockerCertDir` to use the `configfile.GetSearchPaths` for
resolving certificate directories. New `ExtraDropInDirectories` is
introduced to add extra drop-in directory after XDG and before admin
override.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
@jankaluza
Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

image Related to "image" package podman 6 breaking changes that should go only into podman 6 only storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants