forked from kilna/python-lambda-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-2.7
More file actions
23 lines (22 loc) · 837 Bytes
/
Dockerfile-2.7
File metadata and controls
23 lines (22 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ARG python_version=2.7
ARG alpine_version=3.7
FROM python:${python_version}-alpine${alpine_version}
LABEL maintainer="Kilna kilna@kilna.com"
ARG python_lambda_version
ENV python_version=${python_version}\
python_lambda_version=${python_lambda_version:-master}\
python_lambda_url=${python_lambda_url:-https://github.com/nficano/python-lambda}
RUN set -x -e -o pipefail;\
if echo "$python_lambda_version" | grep -q '^[0-9.]*$'; then\
pip install ${python_lambda_url}/zipball/v${python_lambda_version};\
else\
pip install ${python_lambda_url}/zipball/${python_lambda_version};\
fi;\
mkdir /lambda
COPY bin/* /usr/local/bin/
RUN chmod +x /usr/local/bin/*
WORKDIR /lambda
ONBUILD COPY . /lambda
ONBUILD RUN /usr/local/bin/entrypoint.sh
ONBUILD VOLUME /lambda
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]