Environment Variables on build time #1099
Unanswered
dawidmachon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
case 1:
Does Environment Variables setup in UI will be available in Dockerfile in build phase?
For example, in normal docker:
then in cli
docker build --build-arg API_KEY=your_api_key -t my-app .
Or this UI env are only run time in case of swiftwave?
Reference:
https://docs.docker.com/build/building/variables/
case 2, will this be supported?:
RUN --mount=type=secret
# syntax=docker/dockerfile:1 [FROM](https://docs.docker.com/reference/dockerfile/#from) alpine [RUN](https://docs.docker.com/reference/dockerfile/#run) --mount=type=secret,id=API_KEY,env=API_KEY \ some-command --token-from-env $API_KEY
docker buildx build --secret id=API_KEY .
reference:
https://docs.docker.com/reference/dockerfile/#run---mounttypesecret
Beta Was this translation helpful? Give feedback.
All reactions