2020-08-17 15:03:10 -04:00
|
|
|
FROM alpine:3.12
|
|
|
|
|
2020-08-17 15:09:42 -04:00
|
|
|
ARG TARGETARCH=amd64
|
|
|
|
|
2020-08-17 15:03:10 -04:00
|
|
|
RUN echo $'\
|
|
|
|
@edge http://dl-cdn.alpinelinux.org/alpine/edge/main\n\
|
|
|
|
@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing\n\
|
|
|
|
@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
python3 py3-pip py3-setuptools py3-wheel \
|
|
|
|
py3-virtualenv \
|
|
|
|
py3-pillow \
|
|
|
|
py3-aiohttp \
|
|
|
|
py3-magic \
|
|
|
|
py3-ruamel.yaml \
|
|
|
|
py3-commonmark@edge \
|
|
|
|
# Other dependencies
|
|
|
|
ca-certificates \
|
|
|
|
su-exec \
|
|
|
|
# encryption
|
|
|
|
olm-dev \
|
|
|
|
py3-cffi \
|
|
|
|
py3-pycryptodome \
|
|
|
|
py3-unpaddedbase64 \
|
2020-08-17 15:09:42 -04:00
|
|
|
py3-future \
|
|
|
|
bash \
|
|
|
|
curl \
|
|
|
|
jq && \
|
|
|
|
curl -sLo yq https://github.com/mikefarah/yq/releases/download/3.3.2/yq_linux_${TARGETARCH} && \
|
|
|
|
chmod +x yq && mv yq /usr/bin/yq
|
|
|
|
|
2020-08-17 15:03:10 -04:00
|
|
|
|
2021-02-10 02:34:19 -05:00
|
|
|
COPY requirements.txt /opt/mautrix-line/requirements.txt
|
|
|
|
COPY optional-requirements.txt /opt/mautrix-line/optional-requirements.txt
|
|
|
|
WORKDIR /opt/mautrix-line
|
2020-08-17 15:03:10 -04:00
|
|
|
RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \
|
|
|
|
&& pip3 install -r requirements.txt -r optional-requirements.txt \
|
|
|
|
&& apk del .build-deps
|
|
|
|
|
2021-02-10 02:34:19 -05:00
|
|
|
COPY . /opt/mautrix-line
|
2020-08-17 15:03:10 -04:00
|
|
|
RUN apk add git && pip3 install .[e2be] && apk del git \
|
|
|
|
# This doesn't make the image smaller, but it's needed so that the `version` command works properly
|
2021-02-10 02:34:19 -05:00
|
|
|
&& cp mautrix_line/example-config.yaml . && rm -rf mautrix_line
|
2020-08-17 15:03:10 -04:00
|
|
|
|
|
|
|
VOLUME /data
|
|
|
|
ENV UID=1337 GID=1337
|
|
|
|
|
2021-02-10 02:34:19 -05:00
|
|
|
CMD ["/opt/mautrix-line/docker-run.sh"]
|