-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (18 loc) · 763 Bytes
/
Dockerfile
File metadata and controls
22 lines (18 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use a multi-stage build for a smaller final image.
FROM fnproject/python:3.9-dev as build-stage
WORKDIR /function
COPY requirements.txt /function/
# Install dependencies into a separate directory
RUN pip3 install --target /python/ --no-cache-dir -r requirements.txt && \
rm -fr ~/.cache/pip /tmp* requirements.txt && \
chmod -R o+r /python
FROM fnproject/python:3.9
WORKDIR /function
# Copy dependencies and function code
COPY --from=build-stage /python /python
COPY . /function/
COPY --from=mwader/static-ffmpeg:latest /ffmpeg /usr/local/bin/ffmpeg
COPY --from=mwader/static-ffmpeg:latest /ffprobe /usr/local/bin/ffprobe
ENV PYTHONPATH="/python"
ENV PATH="/python/bin:$PATH"
ENTRYPOINT ["fdk", "/function/func.py", "handler"]