diff --git a/Dockerfile b/Dockerfile index 2c3f4374..6c6b5c28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,14 @@ COPY . /opt/mautrixtelegram RUN apk add --no-cache \ python3-dev \ py3-virtualenv \ + py3-pillow \ + py3-aiohttp \ + py3-lxml \ + py3-magic \ + py3-numpy \ + py3-asn1crypto \ + py3-sqlalchemy \ build-base \ - zlib-dev \ - jpeg-dev \ - libxslt-dev \ - libxml2-dev \ - libmagic \ ffmpeg \ bash \ ca-certificates \ @@ -21,9 +23,7 @@ RUN apk add --no-cache \ && cd /opt/mautrixtelegram \ && cp -r docker/root/* / \ && rm docker -rf \ - && virtualenv -p /usr/bin/python3 .venv \ - && source .venv/bin/activate \ - && pip install -r requirements.txt -r optional-requirements.txt + && pip3 install -r requirements.txt -r optional-requirements.txt VOLUME /data diff --git a/docker/root/etc/s6.d/mautrix-telegram/run b/docker/root/etc/s6.d/mautrix-telegram/run index 33a4da27..c82315a1 100755 --- a/docker/root/etc/s6.d/mautrix-telegram/run +++ b/docker/root/etc/s6.d/mautrix-telegram/run @@ -8,7 +8,7 @@ function fixperms { # Go into env cd /opt/mautrixtelegram -source .venv/bin/activate +export FFMPEG_BINARY=/usr/bin/ffmpeg # Replace database path in alembic.ini sed -i "s#sqlite:///mautrix-telegram.db#sqlite:////data/mautrix-telegram.db#" alembic.ini @@ -28,7 +28,7 @@ if [[ ! -f /data/config.yaml ]]; then fi if [[ ! -f /data/registration.yaml ]]; then - python -m mautrix_telegram -g -c /data/config.yaml -r /data/registration.yaml + python3 -m mautrix_telegram -g -c /data/config.yaml -r /data/registration.yaml echo "Didn't find a registration file." echo "Generated ode for you." echo "Copy that over to synapses app service directory." @@ -36,7 +36,5 @@ if [[ ! -f /data/registration.yaml ]]; then exit fi -export FFMPEG_BINARY=/usr/bin/ffmpeg - fixperms -exec su-exec ${UID}:${GID} python -m mautrix_telegram -c /data/config.yaml +exec su-exec ${UID}:${GID} python3 -m mautrix_telegram -c /data/config.yaml