Skip to content

confused about: --container-env-var #2972

@autohandle

Description

@autohandle

Question
when it says:
Environment variables to pass to the build container.

if i pass via sam build:
--container-env-var ReadByIdFunction.GITHUB_TOKEN=TOKEN1 --container-env-var GLOBAL_GITHUB_TOKEN=GLOBAL_TOKEN

in the Dockerfile, should i be able to:
FROM public.ecr.aws/lambda/python:3.7
COPY appRead.py requirements.txt ./
RUN printenv
RUN echo "GLOBAL_GITHUB_TOKEN:" ${GLOBAL_GITHUB_TOKEN}

and see the environment variable?

Metadata

Metadata

Assignees

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