ConceptsBuilds & runtimes
Variables in a build
Your build gets the environment variables of the service, with some exceptions.
The build gets the variables of the linked env groups and of the service.
1 / 3
The build gets the environment variables of the service and of its env groups. See Environment & env groups.
Two examples of use: an install step reads the token of a private registry, and a build puts a public API URL into the code.
What the build does not get
| Not in the build | The log says |
|---|---|
The variables that Ferry adds when the app runs (PORT, FERRY_…) | Nothing |
A ${{…}} reference that Ferry cannot replace, for example to a service with no deploy | ==> Warning: not available at build time (unresolved references): … |
| A reserved name, or a name that is not a correct variable name | ==> Not available at build time (reserved or invalid names): … |
How to use a variable
The variables come as build secrets. See Secrets in a build.
Ferry never gives these names to a build. Thus they cannot break the build.
PATH,HOME,PWD,OLDPWD,HOSTNAME,SHELL,USER,LOGNAME,TERM,SHLVL,TMPDIR,LD_PRELOAD,LD_LIBRARY_PATH,SSH_AUTH_SOCK.- Names that start with
DOCKER_,BUILDKIT_,BUILDX_,COMPOSE_,XDG_orFERRY_BUILD_.