-1
Question
Docker environment variable exists during build but disappears at runtime
The image builds successfully and prints the variable in one build step, but the Node process sees undefined after deployment.
ARG API_URL
RUN npm run build
CMD ["node", "server.js"]
I am currently considering copying the value into the image with ENV. Is that safe for a server secret?