a year ago
I have a Node.js application but I wanted to use my own Dockerfile. I need to use BuildKit's Build Secrets. How do I assign the build secret in railway builds?
2 Replies
a year ago
the service variables are passed in as build args
a year ago
then I'm sorry but you weren't clear in what you are asking
a year ago
ah gotcha, railway does not support this
2 months ago
Please upvote here: https://station.railway.com/feedback/support-docker-build-secrets-0b8787b2
2 months ago
Is there a secure workaround or does it basically mean that I can't use a Dockerfile if I want to install an NPM package from a private registry, for instance?
maiertech
Is there a secure workaround or does it basically mean that I can't use a Dockerfile if I want to install an NPM package from a private registry, for instance?
2 months ago
Hey, if you want to use environment variables at build time in a Dockerfile, be sure to use it like this:
# Specify the variable you need
ARG RAILWAY_SERVICE_NAME
# Use the variable
RUN echo $RAILWAY_SERVICE_NAME
Be sure to declare your environment variables in the stage they are required in.