Update Docker image to Alpine 3.13

This commit is contained in:
Tulir Asokan 2021-05-07 21:45:50 +03:00
parent 2f7c20dffd
commit e26a2abf58
2 changed files with 22 additions and 32 deletions

View File

@ -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

View File

@ -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