CLI should ignore .DS_Store files in context bundles
Description
I recently looked at one of my context bundles' TLS files in Finder on macOS, which created a .DS_Store file. The Finder stores view metadata in .DS_Store files. The Docker CLI then complained on every command invocation about the file.
Steps to reproduce the issue:
- Open a context's TLS directory in the Finder.
- Do something like change the window view settings to cause a
.DS_Storeto be created.
Describe the results you received:
When the .DS_Store file is present, every CLI invocation printed a warning about an unknown file.
WARN[0000] unknown file .DS_Store in context sa-processors-ext tls bundle
Describe the results you expected:
The CLI should ignore .DS_Store files.
Additional information you deem important (e.g. issue happens only occasionally):
N/A
Output of docker version:
Client: Docker Engine - Community
Version: 19.03.2
API version: 1.40
Go version: go1.12.8
Git commit: 6a30dfc
Built: Thu Aug 29 05:26:49 2019
OS/Arch: darwin/amd64
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 19.03.3
API version: 1.40 (minimum version 1.12)
Go version: go1.12.10
Git commit: a872fc2f86
Built: Tue Oct 8 00:56:46 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683
Output of docker info:
N/A
Additional environment details (AWS, VirtualBox, physical, etc.):
Removing the .DS_Store file eliminated the warning.
current version of the warning message is here: https://github.com/docker/cli/blob/master/cli/context/tlsdata.go#L65
we may want to look if we can improve the experience with these kind of files (thumbs.db on windows, .DS_Store on mac). When exporting a context to a file/tar/zip, we should make it so that they’re not included.