-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile-ingestion
More file actions
24 lines (18 loc) · 919 Bytes
/
Dockerfile-ingestion
File metadata and controls
24 lines (18 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM public.ecr.aws/lambda/python:3.12
# Ensure the virtual environment will be available on the `PATH` variable
ENV PATH=/venv/bin:$PATH
# Bake in the env var required to point Django at the correct settings file
ENV DJANGO_SETTINGS_MODULE="metrics.api.settings"
# Copy the production-only dependencies into place for the ingestion component
COPY requirements-prod-ingestion.txt requirements-prod-ingestion.txt
# Main build process
RUN pip install --upgrade pip \
# Upgrade the pip installer to the latest version \
&& pip install -r requirements-prod-ingestion.txt
# Install project dependencies for the ingestion component
# Mounts the application code into the image
COPY . ${LAMBDA_TASK_ROOT}
## Sets the working directory for subsequent `RUN`, `ENTRYPOINT` & `CMD` layers
WORKDIR ${LAMBDA_TASK_ROOT}
# Runs the lambda entrypoint by default
CMD ["ingestion.operations.lambda_entrypoint.handler"]