Dockerfile 754 Bytes
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
FROM index.docker.io/library/python:3.8
Jonas Waeber's avatar
Jonas Waeber committed
2

Jonas Waeber's avatar
Jonas Waeber committed
3
ARG K8S_VERSION=v1.20.4
Jonas Waeber's avatar
Jonas Waeber committed
4
ARG HELM_VERSION=v3.6.3
5

6
ENV FLASK_APP import_api_app
Jonas Waeber's avatar
Jonas Waeber committed
7

8
EXPOSE 5000
Jonas Waeber's avatar
Jonas Waeber committed
9
ENTRYPOINT ["gunicorn"]
Jonas Waeber's avatar
Jonas Waeber committed
10
CMD [ "wsgi:app", "--config", "/configs/gunicorn.conf.py"]
Jonas Waeber's avatar
Jonas Waeber committed
11
12

RUN cd /usr/bin \
Jonas Waeber's avatar
Jonas Waeber committed
13
14
15
16
17
18
  && wget -q https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl \
  && chmod +x ./kubectl \
  && wget -q https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz \
  && tar -xvzf helm-${HELM_VERSION}-linux-amd64.tar.gz \
  && mv linux-amd64/helm helm \
  && rm -rf linux-amd64
Jonas Waeber's avatar
Jonas Waeber committed
19
20
21

WORKDIR /
ADD setup.py /
Jonas Waeber's avatar
Jonas Waeber committed
22

Jonas Waeber's avatar
Jonas Waeber committed
23
RUN mkdir import_api_app \
Jonas Waeber's avatar
Jonas Waeber committed
24
  && pip install --no-cache-dir -e .
Jonas Waeber's avatar
Jonas Waeber committed
25
26
27

WORKDIR /import_api_app
ADD import_api_app/pull-charts.sh .
Jonas Waeber's avatar
Jonas Waeber committed
28
RUN ./pull-charts.sh
Jonas Waeber's avatar
Jonas Waeber committed
29
30

ADD import_api_app .