Mercurial > libervia-backend
view docker/backend-dev/Dockerfile @ 3922:0ff265725489
plugin XEP-0447: handle attachment and download:
- plugin XEP-0447 can now be used in message attachments and to retrieve an attachment
- plugin attach: `attachment` being processed is added to `extra` so the handler can inspect it
- plugin attach: `size` is added to attachment
- plugin download: a whole attachment dict is now used in `download` and
`file_download`/`file_download_complete`. `download_uri` can be used as a shortcut when
just a URI is used. In addition to URI scheme handler, whole attachment handlers can now
be registered with `register_download_handler`
- plugin XEP-0363: `file_http_upload` `XEP-0363_upload_size` triggers have been renamed to
`XEP-0363_upload_pre_slot` and is now using a dict with arguments, allowing for the size
but also the filename to be modified, which is necessary for encryption (filename may
be hidden from URL this way).
- plugin XEP-0446: fix wrong element name
- plugin XEP-0447: source handler can now be registered (`url-data` is registered by
default)
- plugin XEP-0447: source parsing has been put in a separated `parse_sources_elt` method,
as it may be useful to do it independently (notably with XEP-0448)
- plugin XEP-0447: parse received message and complete attachments when suitable
- plugin XEP-0447: can now be used with message attachments
- plugin XEP-0447: can now be used with attachments download
- renamed `options` arguments to `extra` for consistency
- some style change (progressive move from legacy camelCase to PEP8 snake_case)
- some typing
rel 379
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 06 Oct 2022 16:02:05 +0200 |
parents | fd3fe346a14a |
children | 512487ce3579 |
line wrap: on
line source
FROM debian:bullseye-slim LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" ARG REVISION ARG DEBIAN_FRONTEND=noninteractive RUN echo "Building image for Libervia ${REVISION:-dev}" && \ apt-get update && apt-get upgrade -y && \ apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libxml2-dev libxslt-dev libcairo2-dev libjpeg-dev libgirepository1.0-dev libdbus-1-dev libdbus-glib-1-dev dbus-x11 cmake && \ \ # will be used to put many Libervia specific data mkdir -p /usr/share/libervia/certificates && \ addgroup tls-cert --gid 9999 && \ chown :tls-cert /usr/share/libervia/certificates && \ chmod 2770 /usr/share/libervia/certificates && \ # it's better to have a dedicated user useradd -m libervia && adduser libervia tls-cert && \ # we'll put all source there to have an easy mount point mkdir /src && chown libervia:libervia /src && \ \ # we need UTF-8 locale sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen ENV LC_ALL en_US.UTF-8 ENV DOCKER_LIBERVIA_REV=${REVISION:-dev} COPY --chown=root:root session.conf /usr/share/dbus-1/session.conf WORKDIR /home/libervia USER libervia RUN python3 -m venv libervia_env && libervia_env/bin/pip install -U pip wheel && cd /src && \ # We install thoses packages in editable mode, so we can replace them easily with volumes. # We need to move *.egg-info (generated by pip) out of src dirs, otherwise mounting # local repos without it them cause troubles hg clone https://repos.goffi.org/urwid-satext && ~/libervia_env/bin/pip install -e urwid-satext && \ hg clone https://repos.goffi.org/sat_tmp -u "${REVISION:-@}" && ~/libervia_env/bin/pip install -e sat_tmp && \ hg clone https://repos.goffi.org/libervia-templates && ~/libervia_env/bin/pip install -e libervia-templates && \ hg clone https://repos.goffi.org/libervia-media && \ hg clone https://repos.goffi.org/libervia-backend -u "${REVISION:-@}" && ~/libervia_env/bin/pip install -e 'libervia-backend[SVG]' && \ mkdir -p /home/libervia/.local/share/libervia ENV DBUS_SESSION_BUS_ADDRESS="tcp:host=backend,port=55555,family=ipv4;unix:path=/home/libervia/.local/share/dbus_socket" ENV PATH=/home/libervia/libervia_env/bin:$PATH COPY --chown=root:root libervia.conf /etc/_libervia.conf COPY --chown=libervia:libervia scripts/entrypoint.sh /home/libervia/ ENTRYPOINT ["/home/libervia/entrypoint.sh"]