-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
35 lines (27 loc) · 959 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 pip install setuptools
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 ./ ./
RUN pip wheel . -w dist --no-deps
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/.config/spydertop
# run the app
ENTRYPOINT ["spydertop"]