Update dockerfile
This commit is contained in:
parent
4b7ea0e0b6
commit
51d49ebb2a
22
Dockerfile
22
Dockerfile
|
@ -1,5 +1,7 @@
|
||||||
FROM alpine:3.12
|
FROM alpine:3.12
|
||||||
|
|
||||||
|
ARG TARGETARCH=amd64
|
||||||
|
|
||||||
RUN echo $'\
|
RUN echo $'\
|
||||||
@edge http://dl-cdn.alpinelinux.org/alpine/edge/main\n\
|
@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/testing\n\
|
||||||
|
@ -21,21 +23,27 @@ RUN apk add --no-cache \
|
||||||
py3-cffi \
|
py3-cffi \
|
||||||
py3-pycryptodome \
|
py3-pycryptodome \
|
||||||
py3-unpaddedbase64 \
|
py3-unpaddedbase64 \
|
||||||
py3-future
|
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
|
||||||
|
|
||||||
COPY requirements.txt /opt/mautrix-twitter/requirements.txt
|
|
||||||
COPY optional-requirements.txt /opt/mautrix-twitter/optional-requirements.txt
|
COPY requirements.txt /opt/mautrix-amp/requirements.txt
|
||||||
WORKDIR /opt/mautrix-twitter
|
COPY optional-requirements.txt /opt/mautrix-amp/optional-requirements.txt
|
||||||
|
WORKDIR /opt/mautrix-amp
|
||||||
RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \
|
RUN apk add --virtual .build-deps python3-dev libffi-dev build-base \
|
||||||
&& pip3 install -r requirements.txt -r optional-requirements.txt \
|
&& pip3 install -r requirements.txt -r optional-requirements.txt \
|
||||||
&& apk del .build-deps
|
&& apk del .build-deps
|
||||||
|
|
||||||
COPY . /opt/mautrix-twitter
|
COPY . /opt/mautrix-amp
|
||||||
RUN apk add git && pip3 install .[e2be] && apk del git \
|
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
|
# This doesn't make the image smaller, but it's needed so that the `version` command works properly
|
||||||
&& cp mautrix_twitter/example-config.yaml . && rm -rf mautrix_twitter
|
&& cp mautrix_amp/example-config.yaml . && rm -rf mautrix_amp
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
ENV UID=1337 GID=1337
|
ENV UID=1337 GID=1337
|
||||||
|
|
||||||
CMD ["/opt/mautrix-twitter/docker-run.sh"]
|
CMD ["/opt/mautrix-amp/docker-run.sh"]
|
||||||
|
|
Loading…
Reference in New Issue