Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver(docker-container): fix incorrect path when writing certs #1831

Merged
merged 1 commit into from
May 26, 2023

Conversation

crazy-max
Copy link
Member

fixes #1827

Replace invalid characters in the name of the base directory of certificates using the name of the registry which can contain for example a colon when the port is specified.

Replace invalid characters in the name of the base directory of
certificates using the name of the registry which can contain
for example a colon when the port is specified.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@@ -60,7 +63,7 @@ func LoadConfigFiles(bkconfig string) (map[string][]byte, error) {
if regConf == nil {
continue
}
pfx := path.Join("certs", regName)
pfx := path.Join("certs", reInvalidCertsDir.ReplaceAllString(regName, "_"))
Copy link
Member

Choose a reason for hiding this comment

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

IIRC, the engine uses the (awkward) : as-is for Linux, but on Windows it strips it; https://github.com/moby/moby/blob/6e98a7f2c9184d4e91df8abf06e2245a0cd77c58/registry/config_windows.go#L12-L20

@jedevc jedevc added this to the v0.11.0 milestone May 26, 2023
@crazy-max crazy-max merged commit 17bdbbd into docker:master May 26, 2023
57 checks passed
@crazy-max crazy-max deleted the fix-ctn-certs-path branch May 26, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker buildx build error "The directory name is invalid."
3 participants