Update docker image

This commit is contained in:
Tulir Asokan 2024-08-06 18:51:36 +03:00
parent 09a0efbf19
commit 49adb9b441
3 changed files with 10 additions and 14 deletions

View File

@ -10,7 +10,7 @@ default:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build frontend: build frontend:
image: node:18-alpine image: node:20-alpine
stage: build frontend stage: build frontend
before_script: [] before_script: []
variables: variables:

View File

@ -1,9 +1,9 @@
FROM node:18 AS frontend-builder FROM node:20 AS frontend-builder
COPY ./maubot/management/frontend /frontend COPY ./maubot/management/frontend /frontend
RUN cd /frontend && yarn --prod && yarn build RUN cd /frontend && yarn --prod && yarn build
FROM alpine:3.18 FROM alpine:3.20
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip py3-setuptools py3-wheel \ python3 py3-pip py3-setuptools py3-wheel \
@ -11,7 +11,6 @@ RUN apk add --no-cache \
su-exec \ su-exec \
yq \ yq \
py3-aiohttp \ py3-aiohttp \
py3-sqlalchemy \
py3-attrs \ py3-attrs \
py3-bcrypt \ py3-bcrypt \
py3-cffi \ py3-cffi \
@ -34,20 +33,19 @@ RUN apk add --no-cache \
py3-unpaddedbase64 \ py3-unpaddedbase64 \
py3-future \ py3-future \
# plugin deps # plugin deps
#py3-pillow \ py3-pillow \
py3-magic \ py3-magic \
py3-feedparser \ py3-feedparser \
py3-dateutil \ py3-dateutil \
py3-lxml \ py3-lxml \
py3-semver \ py3-semver
&& apk add --no-cache py3-pillow --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
# TODO remove pillow, magic, feedparser, lxml, gitlab and semver when maubot supports installing dependencies # TODO remove pillow, magic, feedparser, lxml, gitlab and semver when maubot supports installing dependencies
COPY requirements.txt /opt/maubot/requirements.txt COPY requirements.txt /opt/maubot/requirements.txt
COPY optional-requirements.txt /opt/maubot/optional-requirements.txt COPY optional-requirements.txt /opt/maubot/optional-requirements.txt
WORKDIR /opt/maubot WORKDIR /opt/maubot
RUN apk add --virtual .build-deps python3-dev build-base git \ RUN apk add --virtual .build-deps python3-dev build-base git \
&& pip3 install -r requirements.txt -r optional-requirements.txt \ && pip3 install --break-system-packages -r requirements.txt -r optional-requirements.txt \
dateparser langdetect python-gitlab pyquery tzlocal \ dateparser langdetect python-gitlab pyquery tzlocal \
&& apk del .build-deps && apk del .build-deps
# TODO also remove dateparser, langdetect and pyquery when maubot supports installing dependencies # TODO also remove dateparser, langdetect and pyquery when maubot supports installing dependencies

View File

@ -1,4 +1,4 @@
FROM alpine:3.18 FROM alpine:3.20
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip py3-setuptools py3-wheel \ python3 py3-pip py3-setuptools py3-wheel \
@ -6,7 +6,6 @@ RUN apk add --no-cache \
su-exec \ su-exec \
yq \ yq \
py3-aiohttp \ py3-aiohttp \
py3-sqlalchemy \
py3-attrs \ py3-attrs \
py3-bcrypt \ py3-bcrypt \
py3-cffi \ py3-cffi \
@ -30,11 +29,10 @@ RUN apk add --no-cache \
py3-unpaddedbase64 \ py3-unpaddedbase64 \
py3-future \ py3-future \
# plugin deps # plugin deps
#py3-pillow \ py3-pillow \
py3-magic \ py3-magic \
py3-feedparser \ py3-feedparser \
py3-lxml \ py3-lxml
&& apk add --no-cache py3-pillow --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
# py3-gitlab # py3-gitlab
# py3-semver # py3-semver
# TODO remove pillow, magic, feedparser, lxml, gitlab and semver when maubot supports installing dependencies # TODO remove pillow, magic, feedparser, lxml, gitlab and semver when maubot supports installing dependencies
@ -43,7 +41,7 @@ COPY requirements.txt /opt/maubot/requirements.txt
COPY optional-requirements.txt /opt/maubot/optional-requirements.txt COPY optional-requirements.txt /opt/maubot/optional-requirements.txt
WORKDIR /opt/maubot WORKDIR /opt/maubot
RUN apk add --virtual .build-deps python3-dev build-base git \ RUN apk add --virtual .build-deps python3-dev build-base git \
&& pip3 install -r requirements.txt -r optional-requirements.txt \ && pip3 install --break-system-packages -r requirements.txt -r optional-requirements.txt \
dateparser langdetect python-gitlab pyquery semver tzlocal cssselect \ dateparser langdetect python-gitlab pyquery semver tzlocal cssselect \
&& apk del .build-deps && apk del .build-deps
# TODO also remove dateparser, langdetect and pyquery when maubot supports installing dependencies # TODO also remove dateparser, langdetect and pyquery when maubot supports installing dependencies