Created
December 26, 2025 00:12
-
-
Save KavyrshinR/d2312c4acb86b99fe39028c81dc785de to your computer and use it in GitHub Desktop.
pass secrets in docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| in Dockerfile | |
| other steps... | |
| RUN --mount=type=secret,id=sentry_auth_token,env=SENTRY_AUTH_TOKEN \ | |
| ./gradlew --no-daemon build | |
| ... other steps | |
| build command | |
| docker build --secret id=sentry_auth_token,src=sentry_auth_token.secret \ | |
| -t rom-kavyrshin/java-project-99 -f Dockerfile . | |
| ############################### | |
| RUN --mount=type=secret,id=<имя_секрета>,env=<имя_переменной> \ | |
| ./gradlew build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment