forked from kilna/python-lambda-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-3.6
More file actions
19 lines (19 loc) · 756 Bytes
/
Dockerfile-3.6
File metadata and controls
19 lines (19 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.6-alpine3.7
LABEL maintainer="Kilna kilna@kilna.com"
ARG python_lambda_version
ENV 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/lambda_*
WORKDIR /lambda
ONBUILD COPY . /lambda
ONBUILD RUN pip install -r requirements.txt &&\
if [[ -d .aws ]]; then cd ~; ln -s /lambda/.aws; fi
ONBUILD VOLUME /lambda