2019-04-19 19:19:36 +03:00
|
|
|
ARG PYTHON_VERSION=3.7
|
|
|
|
|
|
|
|
# build typed-ast in separate stage because it requires gcc and libc-dev
|
2019-08-06 20:44:49 +03:00
|
|
|
FROM python:${PYTHON_VERSION}-slim
|
2019-05-01 18:24:57 +03:00
|
|
|
COPY requirements.txt constraints.txt ./
|
2019-08-06 20:44:49 +03:00
|
|
|
RUN apt-get update -qqy && apt-get install -qqy gcc libc-dev && \
|
2019-05-01 18:24:57 +03:00
|
|
|
pip install -r requirements.txt
|
2019-04-19 19:19:36 +03:00
|
|
|
|
2019-08-06 20:44:49 +03:00
|
|
|
FROM python:${PYTHON_VERSION}-slim
|
2019-05-01 18:24:57 +03:00
|
|
|
# add bash for entrypoing and python2 for google-cloud-sdk
|
2019-08-06 20:44:49 +03:00
|
|
|
RUN apt-get update -qqy && apt-get install -qqy bash python
|
2019-04-19 19:19:36 +03:00
|
|
|
COPY --from=google/cloud-sdk:alpine /google-cloud-sdk /google-cloud-sdk
|
|
|
|
ENV PATH /google-cloud-sdk/bin:$PATH
|
2019-05-01 18:24:57 +03:00
|
|
|
COPY --from=0 /usr/local /usr/local
|
2019-04-19 19:19:36 +03:00
|
|
|
WORKDIR /app
|
2019-05-01 23:38:31 +03:00
|
|
|
COPY .bigqueryrc /root/
|
2019-04-19 19:19:36 +03:00
|
|
|
COPY . .
|
|
|
|
ENTRYPOINT ["/app/script/entrypoint"]
|