-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 875 Bytes
/
Dockerfile
File metadata and controls
29 lines (23 loc) · 875 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
25
26
27
28
29
FROM public.ecr.aws/lambda/python:latest-x86_64
# Set environment variables for Lambda
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH="/var/task:${PATH}" \
LAMBDA_TASK_ROOT=/var/task \
LAMBDA_RUNTIME_DIR=/var/runtime
# Set working directory
WORKDIR ${LAMBDA_TASK_ROOT}
# Install Pandoc
RUN dnf update -y && \
dnf install -y wget tar gzip && \
wget https://github.com/jgm/pandoc/releases/download/3.6.4/pandoc-3.6.4-linux-amd64.tar.gz && \
tar xvzf pandoc-3.6.4-linux-amd64.tar.gz --strip-components 1 -C /usr/local && \
rm pandoc-3.6.4-linux-amd64.tar.gz && \
dnf clean all && \
rm -rf /var/cache/dnf
# Copy requirements and install dependencies
COPY requirements.txt ${LAMBDA_TASK_ROOT}
RUN pip install -r ${LAMBDA_TASK_ROOT}/requirements.txt
# Copy function code
COPY app.py ${LAMBDA_TASK_ROOT}
CMD [ "app.handler" ]