2019-12-27 18:00:13 -05:00
|
|
|
FROM python:3.8-slim-buster AS builder
|
2019-10-01 21:27:48 -04:00
|
|
|
|
|
|
|
RUN mkdir -p /app
|
2019-12-27 18:29:54 -05:00
|
|
|
RUN apt-get update && apt-get install -y git gcc clang cmake g++ pkg-config python3-dev wget
|
2019-10-01 21:27:48 -04:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
RUN wget https://gitlab.matrix.org/matrix-org/olm/-/archive/master/olm-master.tar.bz2 \
|
|
|
|
&& tar -xvf olm-master.tar.bz2 \
|
2019-12-27 18:00:13 -05:00
|
|
|
&& cd olm-master && make && make PREFIX="/usr" install
|
|
|
|
|
|
|
|
RUN pip --no-cache-dir install --upgrade pip setuptools wheel
|
2019-10-01 21:27:48 -04:00
|
|
|
|
|
|
|
COPY . /app
|
2019-12-27 18:00:13 -05:00
|
|
|
|
|
|
|
RUN pip wheel . --wheel-dir /wheels --find-links /wheels
|
|
|
|
|
|
|
|
FROM python:3.8-slim-buster AS run
|
|
|
|
|
|
|
|
COPY --from=builder /usr/lib/libolm* /usr/lib/
|
|
|
|
COPY --from=builder /wheels /wheels
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN pip --no-cache-dir install --find-links /wheels --no-index pantalaimon
|
2019-10-01 21:27:48 -04:00
|
|
|
|
|
|
|
VOLUME /data
|
|
|
|
ENTRYPOINT ["pantalaimon"]
|
2019-10-03 00:10:59 -04:00
|
|
|
CMD ["-c", "/data/pantalaimon.conf", "--data-path", "/data"]
|