-
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.
feat: clean up Dockerfiles and improve their documentation
- Loading branch information
Showing
4 changed files
with
22 additions
and
22 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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
FROM amazon/aws-lambda-python:3.11 | ||
FROM amazon/aws-lambda-python:3.10 | ||
|
||
# When sending request from the UI it crashes as described in this issue, this is a patch for it | ||
# https://github.com/aws/aws-lambda-runtime-interface-emulator/issues/97#issuecomment-1707171018 | ||
RUN curl -Lo /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/download/v1.10/aws-lambda-rie \ | ||
&& chmod +x /usr/local/bin/aws-lambda-rie | ||
|
||
# Install main dependency | ||
COPY pyproject.toml /tmp/eidos/pyproject.toml | ||
COPY README.md /tmp/eidos/README.md | ||
COPY src /tmp/eidos/src | ||
RUN pip install --no-cache-dir "/tmp/eidos" | ||
|
||
# Copy default functions and provide ENV to override it functions | ||
COPY ./functions /var/task/functions | ||
ENV EIDOS_FUNCTIONS_FOLDER=/var/task/functions | ||
COPY README.md /code/README.md | ||
COPY src /code/src | ||
COPY pyproject.toml /code/pyproject.toml | ||
COPY ./functions /functions | ||
|
||
# Copy lambda's code | ||
#COPY serverless/eidos/src/ /var/task | ||
ENV EIDOS_ENV production | ||
|
||
ENV EIDOS_FUNCTIONS_FOLDER=/functions | ||
|
||
RUN pip install --no-cache-dir "/code" | ||
|
||
EXPOSE 8080 | ||
|
||
# Setup lambda's handler | ||
CMD [ "eidos.lambda.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
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