forked from kapicorp/kapitan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.pyinstaller
46 lines (33 loc) · 1.23 KB
/
Dockerfile.pyinstaller
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# First build the Helm binding
FROM golang:1.14.4-stretch AS helm-builder
RUN mkdir /kapitan
WORKDIR /kapitan
COPY ./kapitan/inputs/helm ./kapitan/inputs/helm
RUN chmod +x ./kapitan/inputs/helm/build.sh \
&& ./kapitan/inputs/helm/build.sh
COPY ./kapitan/dependency_manager/helm ./kapitan/dependency_manager/helm
RUN chmod +x ./kapitan/dependency_manager/helm/build.sh \
&& ./kapitan/dependency_manager/helm/build.sh
COPY ./kapitan ./kapitan
COPY ./MANIFEST.in ./MANIFEST.in
COPY ./requirements.txt ./requirements.txt
COPY ./scripts/pyinstaller.sh ./pyinstaller.sh
COPY ./setup.py ./setup.py
FROM python:3.7-slim-stretch
SHELL ["/bin/bash", "-i", "-c"]
ARG PYINSTALLER_VERSION=3.5
COPY --from=helm-builder /kapitan /kapitan
WORKDIR /kapitan
ENV PATH="/opt/venv/bin:${PATH}"
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential patchelf \
&& python -m venv /opt/venv \
&& pip install --upgrade pip wheel \
&& pip install pyinstaller==$PYINSTALLER_VERSION \
&& pip install staticx \
&& pip install -r requirements.txt \
&& ./kapitan/inputs/helm/build.sh \
&& ./kapitan/dependency_manager/helm/build.sh \
&& chmod +x ./pyinstaller.sh
ENTRYPOINT ["./pyinstaller.sh"]