You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Docker secret with GitHub secret not being passed to build process
Description
I'm trying to use a GitHub secret as a Docker secret to pass my token to the Docker build process. However, I'm getting an error that the secret is invalid, and it appears the --secret flag isn't being sent to the Docker build command.
Current Configuration
I'm using the docker/build-push-action to build my Docker image and attempting to pass a secret from GitHub secrets to the Docker build process.
When the build runs, I receive an error indicating that the secret is invalid. Additionally, when examining the build logs, I don't see the --secret flag being passed to the Docker build command.
Expected Behavior
The GitHub secret should be properly passed as a Docker secret to the build process, and the --secret flag should be included in the Docker build command.
Additional Information
I've verified that the GitHub secret is correctly stored and accessible to the workflow, also has expiration date.
The Dockerfile does attempt to use the secret with the expected syntax.
Questions
Is there a specific format or configuration needed to ensure the --secret flag is passed to the Docker build command?
Are there known limitations when passing GitHub secrets to Docker builds?
Any help troubleshooting this issue would be greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Issue: Docker secret with GitHub secret not being passed to build process
Description
I'm trying to use a GitHub secret as a Docker secret to pass my token to the Docker build process. However, I'm getting an error that the secret is invalid, and it appears the
--secret
flag isn't being sent to the Docker build command.Current Configuration
I'm using the docker/build-push-action to build my Docker image and attempting to pass a secret from GitHub secrets to the Docker build process.
My workflow configuration looks something like:
Error
When the build runs, I receive an error indicating that the secret is invalid. Additionally, when examining the build logs, I don't see the
--secret
flag being passed to the Docker build command.Expected Behavior
The GitHub secret should be properly passed as a Docker secret to the build process, and the
--secret
flag should be included in the Docker build command.Additional Information
Questions
--secret
flag is passed to the Docker build command?Any help troubleshooting this issue would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions