question about injecting environment variable thorugh docker run --env #85
Replies: 2 comments
-
@hyun11732 - Did you add the See: https://github.com/expatfile/next-runtime-env#getting-started- |
Beta Was this translation helpful? Give feedback.
-
Hi @HofmannZ! With reference to this thread too, I am finding that I cannot use next-runtime-env with docker run and believe that it is due to using a multistage dockerfile (an equivalent single stage works just fine). Is there any reason that you are aware of here or special measures to take to allow it to work? Thank you |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am really suffering from trying to inject environment varaible through docker run --env and i found your package.
In Next JS, I tried
const temp - () = > {
const { NEXT_PUBLIC_FOO } = useEnvContext();
console.log(NEXT_PUBLIC_FOO );
};
export default temp;
and did docker run XXX --env NEXT_PUBLIC_FOO=hi
but console.log still prints undefined.... I dont think it recognizes my runtime environment variable injected from docker run --env.
Is there any solution?
Thank you!! please help me !!!
Beta Was this translation helpful? Give feedback.
All reactions