Skip to content

question about injecting environment variable thorugh docker run --env #84

@hyun11732

Description

@hyun11732

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 !!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions