Conversation
Opening a context's TLS directory in Finder can create a ".DS_Store"
file there. After that, every command that talks to the daemon through
the context prints a warning:
unknown file in context my-context TLS bundle: .DS_Store
The file also shows up in "docker context inspect", and is included by
"docker context export".
None of the TLS files the CLI writes ("ca.pem", "cert.pem", "key.pem")
are hidden, so skip hidden files when listing a context's TLS files.
Besides ".DS_Store", this covers the "._*" AppleDouble files macOS
creates on drives that can't store extended attributes (such as
FAT-formatted USB drives), and temporary files left behind if writing
a TLS file is interrupted. Windows Explorer's "Thumbs.db" and
"desktop.ini" are skipped too, ignoring case.
Other unexpected files, such as a certificate saved as "ca.crt", still
produce a warning.
Signed-off-by: Arian Boukani <arbo@yorku.ca>
2arian3
force-pushed
the
context-ignore-os-metadata-files
branch
from
September 25, 2026 09:37
26b719f to
860a61d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On macOS, opening a context's TLS directory in Finder can leave a
.DS_Storefile in it. After that, every command that talks to the daemon through the context prints a warning:The file also shows up in
docker context inspect, and gets included bydocker context export.None of the TLS files the CLI writes (
ca.pem,cert.pem,key.pem) are hidden, so this skips hidden files when listing a context's TLS files. That covers.DS_Store,._*AppleDouble files, and the.tmp-*files thatatomicwriterleaves behind if a write is interrupted. Windows Explorer'sThumbs.dbanddesktop.iniare skipped too, ignoring case. Any other unexpected file, like a certificate saved asca.crt, still gets the warning.To try it, with a context that has TLS files:
Without this change the warning is printed. With it, it isn't.
Release notes (optional)