-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update deps * ncu -u * add devDependencies * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * add v1.28.0 * add v1272 * fix 1.28 via lambda container img * clean * clean * clean * clean * clean * clean * clean
- Loading branch information
Showing
13 changed files
with
18,520 additions
and
8,937 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Define custom function directory | ||
ARG FUNCTION_DIR="/function" | ||
|
||
# Use a slim version of Python for building | ||
FROM python:3.11-slim as build-image | ||
|
||
# Include global arg in this stage of the build | ||
ARG FUNCTION_DIR | ||
|
||
# Copy function code | ||
RUN mkdir -p ${FUNCTION_DIR} | ||
# COPY . ${FUNCTION_DIR} | ||
|
||
# Install the function's dependencies, then clean up the cache to reduce size | ||
RUN pip install --target ${FUNCTION_DIR} awslambdaric && \ | ||
pip cache purge | ||
|
||
# Use Envoy's slim image if available, otherwise, stick with the current image | ||
# FROM envoyproxy/envoy-contrib:v1.28.0-slim as envoy | ||
FROM envoyproxy/envoy-contrib:v1.28.0 as envoy | ||
|
||
# Final base image | ||
FROM python:3.11-slim | ||
|
||
# Copy Envoy binary | ||
COPY --from=envoy /usr/local/bin/envoy /usr/local/bin/envoy | ||
|
||
# Include global arg in this stage of the build | ||
ARG FUNCTION_DIR | ||
|
||
# Set working directory to function root directory | ||
WORKDIR ${FUNCTION_DIR} | ||
|
||
# Copy in the built dependencies from the build image | ||
COPY --from=build-image ${FUNCTION_DIR} ${FUNCTION_DIR} | ||
|
||
# Set the entrypoint for the Lambda Runtime Interface Client | ||
ENTRYPOINT ["/usr/local/bin/python", "-m", "awslambdaric"] | ||
|
||
# Copy handler function | ||
COPY apig.py ${FUNCTION_DIR} | ||
COPY main.py ${FUNCTION_DIR} | ||
|
||
# Set the handler function | ||
CMD ["main.handler"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.