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
|
|
|
|
FROM python:${PYTHON_VERSION}-alpine
|
2019-05-01 18:24:57 +03:00
|
|
|
COPY requirements.txt constraints.txt ./
|
2019-04-19 19:19:36 +03:00
|
|
|
RUN apk add --no-cache gcc libc-dev && \
|
2019-05-01 18:24:57 +03:00
|
|
|
pip install -r requirements.txt
|
2019-04-19 19:19:36 +03:00
|
|
|
|
|
|
|
FROM python:${PYTHON_VERSION}-alpine
|
2019-05-01 18:24:57 +03:00
|
|
|
# add bash for entrypoing and python2 for google-cloud-sdk
|
|
|
|
RUN apk add --no-cache bash python2
|
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"]
|