How can I use ENV variables when deploying a Dockerfile?
I have set all my ENV variables in railway. However, the dockerfile does not recognize them. Any ideas how I should do it?
11 Replies
Project ID:
N/A
So for example, It should be ARG REACT_APP_GOOGLE_TOKEN ??
yep!
And would the varialbes be used automatically? I mean, just by having ARG VARIABLE is enough to use them app wide? (I don't know docker much)
Also, can I use nixpacks in docker?
all service variables are aviable at runtime theres nothing you need to do for that, you only need to follow the info in the docs if you need the variables at build time
Also, can I use nixpacks in docker?explain?
I want to use
NIXPACKS_APT_PKGS=gconf-service libgbm-dev libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils
from what I understand, they will get installed?
can you send me your current dockerfile?
please enclose this in triple backticks
these are apt packages, just use them in the dockerfile like how are you for tzdata
Thanks!!