align file and folder permissions #2739
Closed
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.
When invoking
docker
withsudo
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 macossudo
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:buildx/commands/build.go
Line 377 in 1de3325
buildx/commands/build.go
Line 745 in 1de3325
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.