moby / moby/buildkit

Can't use directories as --mount=type=secret

Open
#970 6 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
50

Description

Currently, directories can't be mounted as secrets using --mount=type=secret. This would be really helpful for mounting Google Cloud credentials. Current error:

rpc error: code = Unknown desc = read /Users/oliviercorradi/.config/gcloud: is a directory

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported --mount=type=secret failure with the directory /Users/oliviercorradi/.config/gcloud, then trace how BuildKit handles secret mounts. Compare the current file-only behavior with the requested directory behavior for Google Cloud credentials; done means the directory mounts without the reported “is a directory” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.