Verified Commit 312d3b1f authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

adapt and optimise Dockerfile

parent 103e2021
Pipeline #31706 passed with stages
in 2 minutes and 11 seconds
FROM python:3.8
FROM index.docker.io/library/python:3.8
ARG K8S_VERSION=v1.17.11
ARG HELM_VERSION=v3.6.3
WORKDIR /autodeploy_service_app
ADD autodeploy_service_app /autodeploy_service_app/
ADD requirements.txt /autodeploy_service_app/
WORKDIR /autodeploy_service_app/kubectl
#install kubectl so that helm can work in the docker container
RUN wget https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kubectl && chmod +x ./kubectl
ENV PATH /autodeploy_service_app/kubectl:$PATH
WORKDIR /autodeploy_service_app
#install helm
RUN wget https://get.helm.sh/helm-v3.2.1-linux-amd64.tar.gz && tar -xvzf helm-v3.2.1-linux-amd64.tar.gz && mv linux-amd64 helm
ENV PATH /autodeploy_service_app/helm:$PATH
RUN ./pull-charts.sh
RUN pip install -r requirements.txt
WORKDIR /
ADD setup.py /
RUN pip install -e .
ENV FLASK_APP autodeploy_service_app
ENV FLASK_ENV development
EXPOSE 5000
ENTRYPOINT ["python"]
CMD ["/autodeploy_service_app/main.py"]
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
WORKDIR /
ADD setup.py /
RUN mkdir autodeploy_service_app \
&& pip install -e .
WORKDIR /autodeploy_service_app
ADD requirements.txt .
RUN pip install -r requirements.txt
ADD autodeploy_service_app .
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment