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

Jonas Waeber's avatar
Jonas Waeber committed
3
4
ARG K8S_VERSION=v1.20.4
ARG HELM_VERSION=v3.7.0
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 ["--bind", "0.0.0.0:5000", "wsgi:app", "--log-level", "info", "--log-file", "/dev/stdout", "--access-logfile", "/dev/stdout"]
Jonas Waeber's avatar
Jonas Waeber committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

RUN cd /usr/bin \
&& 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

WORKDIR /
ADD setup.py /
RUN mkdir import_api_app \
&& pip install -e .

WORKDIR /import_api_app
ADD requirements.txt .
ADD import_api_app/pull-charts.sh .
RUN pip install -r requirements.txt \
&& ./pull-charts.sh

ADD import_api_app .