mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-01-12 07:59:25 -05:00
Add builder stage to Dockerfile
This commit is contained in:
parent
4e29caf8b2
commit
85bfadf2f3
18
Dockerfile
18
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM python:3.8-slim-buster
|
||||
FROM python:3.8-slim-buster AS builder
|
||||
|
||||
# Many of these dependencies are required to build the app's dependencies, so staging these out doesn't help much
|
||||
RUN mkdir -p /app
|
||||
@ -7,11 +7,21 @@ RUN apt-get update && apt-get install -y git gcc clang cmake pkg-config libdbus-
|
||||
WORKDIR /app
|
||||
RUN wget https://gitlab.matrix.org/matrix-org/olm/-/archive/master/olm-master.tar.bz2 \
|
||||
&& tar -xvf olm-master.tar.bz2 \
|
||||
&& cd olm-master && make && make PREFIX="/usr" install && cd ../ \
|
||||
&& rm -r olm-master
|
||||
&& cd olm-master && make && make PREFIX="/usr" install
|
||||
|
||||
RUN pip --no-cache-dir install --upgrade pip setuptools wheel
|
||||
|
||||
COPY . /app
|
||||
RUN pip install . PyGObject && python setup.py install
|
||||
|
||||
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
|
||||
|
||||
VOLUME /data
|
||||
ENTRYPOINT ["pantalaimon"]
|
||||
|
Loading…
Reference in New Issue
Block a user