-
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.
- Loading branch information
1 parent
145395f
commit e6e6160
Showing
1 changed file
with
7 additions
and
7 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,20 +1,20 @@ | ||
# Usar a imagem base do AWS Lambda com Python | ||
FROM public.ecr.aws/lambda/python:3.10 | ||
|
||
# Instala o Poetry via pip | ||
RUN pip install poetry | ||
|
||
# Copia o arquivo pyproject.toml e poetry.lock (se existir) para instalar dependências | ||
COPY pyproject.toml poetry.lock* ./ | ||
|
||
# Instala as dependências com o Poetry | ||
RUN poetry config virtualenvs.create false && poetry install --no-dev | ||
# Configurar o Poetry para não criar virtualenv | ||
RUN poetry config virtualenvs.create false | ||
|
||
# Verificar configuração do Poetry | ||
RUN poetry config --list | ||
|
||
RUN poetry install --no-dev | ||
|
||
# Copiar o código da função Lambda e a pasta src | ||
COPY artifacts/ artifacts/ | ||
COPY deployment/lambda/app/lambda_function.py ./ | ||
COPY src/ src/ | ||
COPY config/ config/ | ||
|
||
# Comando que será executado quando a função Lambda for invocada | ||
CMD ["lambda_function.lambda_handler"] |