Compare commits

...
Sign in to create a new pull request.
Author SHA1 Message Date
2a6a99e6a1 fix backend OCI image build 2026-11-10 12:03:37 +01:00

View file

@ -1,4 +1,4 @@
FROM debian:bookworm-slim FROM debian:trixie-slim
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
@ -7,7 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN echo "Building image for Libervia ${REVISION:-dev}" && \ RUN echo "Building image for Libervia ${REVISION:-dev}" && \
apt-get update && apt-get upgrade -y && \ 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 python3-gpg git && \ apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libxml2-dev libxslt-dev libcairo2-dev libjpeg-dev libgirepository-2.0-dev libdbus-1-dev libdbus-glib-1-dev dbus-x11 cmake python3-gpg git gir1.2-girepository-2.0-dev build-essential && \
\ \
# will be used to put many Libervia specific data # will be used to put many Libervia specific data
mkdir -p /usr/share/libervia/certificates && \ mkdir -p /usr/share/libervia/certificates && \
@ -29,19 +29,22 @@ COPY --chown=root:root session.conf /usr/share/dbus-1/session.conf
WORKDIR /home/libervia WORKDIR /home/libervia
RUN mkdir -p /run/user/1000/libervia
RUN chown -R libervia:libervia /run/user/1000
RUN apt-get install -y --no-install-recommends libsodium-dev RUN apt-get install -y --no-install-recommends libsodium-dev
USER libervia USER libervia
RUN python3 -m venv --system-site-packages libervia_env && libervia_env/bin/pip install -U pip wheel RUN python3 -m venv --system-site-packages libervia_env && libervia_env/bin/pip install -U pip wheel sqlalchemy[asyncio]
RUN cd /src && \ RUN cd /src && \
# We install thoses packages in editable mode, so we can replace them easily with volumes. # 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 # We need to move *.egg-info (generated by pip) out of src dirs, otherwise mounting
# local repos without it them cause troubles # local repos without it them cause troubles
hg clone https://repos.goffi.org/urwid-satext && ~/libervia_env/bin/pip install -e urwid-satext && \ git clone https://www.goffi.org/forge/goffi/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 && \ git clone https://www.goffi.org/forge/goffi/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 && \ git clone https://www.goffi.org/forge/goffi/libervia-templates && ~/libervia_env/bin/pip install -e libervia-templates && \
hg clone https://repos.goffi.org/libervia-media && \ git clone https://www.goffi.org/forge/goffi/libervia-media && \
hg clone https://repos.goffi.org/libervia-backend -u "${REVISION:-@}" && ~/libervia_env/bin/pip install -e 'libervia-backend[SVG]' && \ git clone https://www.goffi.org/forge/goffi/libervia-backend -u "${REVISION:-@}" && ~/libervia_env/bin/pip install -e 'libervia-backend[SVG]' && \
mkdir -p /home/libervia/.local/share/libervia 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 DBUS_SESSION_BUS_ADDRESS="tcp:host=backend,port=55555,family=ipv4;unix:path=/home/libervia/.local/share/dbus_socket"