-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Dockerfile and Packer configuration: update paths for packag…
…e installation and add explicit copy for template_automation
- Loading branch information
Your Name
committed
May 9, 2025
1 parent
7e7b867
commit e8ee80f
Showing
2 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,25 @@ | ||
| # DEPRECATED: This Dockerfile is not used for deployment. | ||
| # Lambda container image is built using Packer (see packer.pkr.hcl) | ||
| # ---------------------------------------------------------------- | ||
| # Keeping this file for reference only | ||
|
|
||
| FROM public.ecr.aws/lambda/python:3.11 | ||
|
|
||
| # Copy requirements first to leverage Docker cache | ||
| COPY requirements.txt /tmp/ | ||
| RUN pip install --no-cache-dir -r /tmp/requirements.txt -t ${LAMBDA_TASK_ROOT} | ||
| RUN pip install --no-cache-dir -r /tmp/requirements.txt -t /var/task | ||
|
|
||
| # Copy all code files for package installation | ||
| COPY . /tmp/app/ | ||
|
|
||
| # Install the package in development mode to make it available to Python | ||
| RUN pip install -e /tmp/app -t ${LAMBDA_TASK_ROOT} | ||
| RUN pip install -e /tmp/app -t /var/task | ||
|
|
||
| # Explicitly copy the template_automation package to the Lambda task root | ||
| COPY template_automation /var/task/template_automation/ | ||
|
|
||
| # Copy the root app.py file (this is essential for AWS Lambda to find the handler) | ||
| COPY app.py ${LAMBDA_TASK_ROOT}/ | ||
| COPY app.py /var/task/ | ||
|
|
||
| # Ensure the Lambda handler is correctly set | ||
| CMD [ "app.lambda_handler" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters