-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
35 lines (27 loc) · 956 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
28
29
30
31
32
33
34
35
FROM python:3-alpine as build
RUN apk add --no-cache git
# install limited asciimatics
# this is necessary to remove the pillow dependency
# see https://github.com/peterbrittain/asciimatics/issues/95
WORKDIR /
RUN git clone https://github.com/peterbrittain/asciimatics.git && \
cd asciimatics && \
rm asciimatics/renderers/images.py && \
grep -v 'Pillow >= [0-9]*\.[0-9]*\.[0-9]*' setup.py > setup.py.tmp && \
mv setup.py.tmp setup.py && \
python setup.py bdist_wheel
# install spydertop
WORKDIR /spydertop
COPY setup.py ./
COPY spydertop spydertop
RUN python setup.py bdist_wheel
FROM python:3-alpine
WORKDIR /spydertop
COPY --from=build /asciimatics/dist/asciimatics-*.whl .
RUN pip --no-cache-dir install asciimatics-*.whl
COPY --from=build /spydertop/dist/spydertop-*.whl .
RUN pip --no-cache-dir install spydertop-*.whl
COPY ./examples /spydertop/examples
VOLUME /root/.spyderbat-api
# run the app
ENTRYPOINT ["spydertop"]