Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ ARG PYTHON_VERSION
# Base image is Python 3.8 provided by AWS Lambda in Docker Hub
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}

WORKDIR /app

# These are visible, the image is public so secrets would be accessible anyways
# We'd like these to be available if any evaluation function needs it...
# TODO: ~Find a better way to do this~
Expand All @@ -18,14 +16,14 @@ ENV INVOKER_KEY=${INVOKER_KEY}
ENV INVOKER_REGION=${INVOKER_REGION}

# Install backend dependencies
COPY requirements.txt base_requirements.txt
RUN pip3 install -r base_requirements.txt
COPY requirements.txt ${LAMBDA_TASK_ROOT}/base_requirements.txt
RUN pip3 install -r ${LAMBDA_TASK_ROOT}/base_requirements.txt

# Copy the scripts
COPY __init__.py ./app/
COPY handler.py ./app/
COPY tests/*.py ./app/tests/
COPY tools/*.py ./app/tools/
COPY __init__.py ${LAMBDA_TASK_ROOT}/app/
COPY handler.py ${LAMBDA_TASK_ROOT}/app/
COPY tests/*.py ${LAMBDA_TASK_ROOT}/app/tests/
COPY tools/*.py ${LAMBDA_TASK_ROOT}/app/tools/

# Request-response-schemas repo/branch to use for validation
ENV SCHEMAS_URL=https://raw.githubusercontent.com/lambda-feedback/request-response-schemas/master