From e26a2abf5838c74efbc9b3df5e25d0ce92606bf9 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 7 May 2021 21:45:50 +0300 Subject: [PATCH] Update Docker image to Alpine 3.13 --- Dockerfile | 27 +++++++++++---------------- Dockerfile.ci | 27 +++++++++++---------------- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index f855dfb..74277c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,7 @@ FROM node:12 AS frontend-builder COPY ./maubot/management/frontend /frontend RUN cd /frontend && yarn --prod && yarn build -FROM alpine:3.12 - -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 +FROM alpine:3.13 RUN apk add --no-cache \ python3 py3-pip py3-setuptools py3-wheel \ @@ -25,14 +20,14 @@ RUN apk add --no-cache \ py3-click \ py3-packaging \ py3-markdown \ - py3-alembic@edge \ - py3-cssselect@edge \ - py3-commonmark@edge \ + py3-alembic \ +# py3-cssselect \ + py3-commonmark \ py3-pygments \ - py3-tz@edge \ - py3-tzlocal@edge \ - py3-regex@edge \ - py3-wcwidth@edge \ + py3-tz \ +# py3-tzlocal \ + py3-regex \ + py3-wcwidth \ # encryption py3-cffi \ olm-dev \ @@ -45,8 +40,8 @@ RUN apk add --no-cache \ py3-feedparser \ py3-dateutil \ py3-lxml \ - py3-gitlab@edge \ - py3-semver@edge + py3-gitlab +# py3-semver@edge # TODO remove pillow, magic, feedparser, lxml, gitlab and semver when maubot supports installing dependencies COPY requirements.txt /opt/maubot/requirements.txt @@ -55,7 +50,7 @@ WORKDIR /opt/maubot RUN apk add --virtual .build-deps python3-dev build-base git \ && sed -Ei 's/psycopg2-binary.+//' optional-requirements.txt \ && pip3 install -r requirements.txt -r optional-requirements.txt \ - dateparser langdetect python-gitlab pyquery cchardet \ + dateparser langdetect python-gitlab pyquery cchardet semver tzlocal cssselect \ && apk del .build-deps # TODO also remove dateparser, langdetect and pyquery when maubot supports installing dependencies diff --git a/Dockerfile.ci b/Dockerfile.ci index 494b7f5..950fac1 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1,9 +1,4 @@ -FROM alpine:3.12 - -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 +FROM alpine:3.13 RUN apk add --no-cache \ python3 py3-pip py3-setuptools py3-wheel \ @@ -20,14 +15,14 @@ RUN apk add --no-cache \ py3-click \ py3-packaging \ py3-markdown \ - py3-alembic@edge \ - py3-cssselect@edge \ - py3-commonmark@edge \ + py3-alembic \ +# py3-cssselect \ + py3-commonmark \ py3-pygments \ - py3-tz@edge \ - py3-tzlocal@edge \ - py3-regex@edge \ - py3-wcwidth@edge \ + py3-tz \ +# py3-tzlocal \ + py3-regex \ + py3-wcwidth \ # encryption py3-cffi \ olm-dev \ @@ -39,8 +34,8 @@ RUN apk add --no-cache \ py3-magic \ py3-feedparser \ py3-lxml \ - py3-gitlab@edge \ - py3-semver@edge + py3-gitlab +# py3-semver # TODO remove pillow, magic, feedparser, lxml, gitlab and semver when maubot supports installing dependencies COPY requirements.txt /opt/maubot/requirements.txt @@ -49,7 +44,7 @@ WORKDIR /opt/maubot RUN apk add --virtual .build-deps python3-dev build-base git \ && sed -Ei 's/psycopg2-binary.+//' optional-requirements.txt \ && pip3 install -r requirements.txt -r optional-requirements.txt \ - dateparser langdetect python-gitlab pyquery cchardet \ + dateparser langdetect pyquery cchardet semver tzlocal cssselect \ && apk del .build-deps # TODO also remove dateparser, langdetect and pyquery when maubot supports installing dependencies