-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: add a Dockerfile for running the python script * fix: fix lambda payload format in test script * docs: update README
- Loading branch information
1 parent
84b7cfd
commit 3959307
Showing
4 changed files
with
50 additions
and
14 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM python:3.9-slim as builder | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends gcc | ||
|
||
COPY requirements.txt . | ||
RUN python -m venv /opt/venv | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
RUN pip install --upgrade pip && \ | ||
pip install -r requirements.txt | ||
|
||
COPY . . | ||
|
||
FROM python:3.9-slim | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /opt/venv /opt/venv | ||
COPY --from=builder /app/test_lambda_runtime.py . | ||
|
||
ENV PATH="/opt/venv/bin:$PATH" | ||
|
||
EXPOSE 5000 | ||
|
||
CMD ["python", "test_lambda_runtime.py"] |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
requests |
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