You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM public.ecr.aws/lambda/python:3.12
USER root
ENV LAMBDA_TASK_ROOT=/var/task
WORKDIR ${LAMBDA_TASK_ROOT}
COPY requirements.txt ${LAMBDA_TASK_ROOT}
RUN pip install -r requirements.txt
COPY lambda_function.py ${LAMBDA_TASK_ROOT}
CMD [ "lambda_function.lambda_handler" ]
Debug Output
Panic Output
Expected Behaviour
When building the image with the docker_image resource I would expect it to run like it does when run with the docker build command.
Actual Behaviour
When building the image with the docker_image resource the COPY commands are run as nobody and not the current USER. The Dockerfile(s) need to all be updated to
Community Note
Terraform (and docker Provider) Version
Affected Resource(s)
docker_image
Terraform Configuration Files
Debug Output
Panic Output
Expected Behaviour
When building the image with the
docker_image
resource I would expect it to run like it does when run with thedocker build
command.Actual Behaviour
When building the image with the
docker_image
resource the COPY commands are run asnobody
and not the currentUSER
. The Dockerfile(s) need to all be updated toSteps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: