docker / buildx

Docker CLI plugin for extended build capabilities with BuildKit
Apache License 2.0
3.58k stars 482 forks source link

align file and folder permissions #2739

Closed crazy-max closed 4 weeks ago

crazy-max commented 1 month ago

When invoking docker with sudo the owner will not be the one from user space and therefore some files and folders in buildx config might not be accessible by other tools (on macos sudo keeps user home dir). This affects reading current builder, last activity for a builder or local state. This change aligns file and folder permissions. Similar to how image id and metadata file are currently created:

And same with cli when creating context: https://github.com/docker/cli/blob/31eeed7ca4c951ede2d18c73e4bd47e8189be221/cli/context/store/metadatastore.go#L43

This will avoid permissions issues reported on Docker Desktop when opening the build view on macos.