forked from hjacobs/kube-ops-view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (17 loc) · 796 Bytes
/
Dockerfile
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
FROM python:3.7-alpine3.8
WORKDIR /
RUN apk add --no-cache python3 python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev ca-certificates
COPY Pipfile.lock /
COPY pipenv-install.py /
RUN /pipenv-install.py && \
rm -fr /usr/local/lib/python3.7/site-packages/pip && \
rm -fr /usr/local/lib/python3.7/site-packages/setuptools && \
apk del python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev && \
rm -rf /var/cache/apk/* /root/.cache /tmp/*
FROM python:3.7-alpine3.8
WORKDIR /
COPY --from=0 /usr/local/lib/python3.7/site-packages /usr/local/lib/python3.7/site-packages
COPY kube_ops_view /kube_ops_view
ARG VERSION=dev
RUN sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" /kube_ops_view/__init__.py
ENTRYPOINT ["/usr/local/bin/python", "-m", "kube_ops_view"]