Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty secret when set from environment variable with --secret id=MYSECRET,type=env #5808

Open
r10r opened this issue Oct 31, 2024 · 0 comments
Assignees

Comments

@r10r
Copy link
Contributor

r10r commented Oct 31, 2024

When playing with secrets I first passed with the following options:

MYSECRET=foobar buildah bud --secret id=MYSECRET,type=env

FROM alpine:latest
RUN --mount=type=secret,id=MYSECRET echo "MYSECRET: $(cat /run/secrets/MYSECRET)"

But the secret file is empty. Seems there is a missing case in https://github.com/containers/buildah/blob/release-1.37/pkg/parse/parse.go#L1264 that checks for type=env.

I know know after studying the code and the latest changes to the manual that I can simply omit thetype=env
but I still think that this case should be fixed.

@nalind nalind self-assigned this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants