comparison docker/backend-dev/Dockerfile @ 3647:57d43e3e0095

docker: set `DBUS_SESSION_BUS_ADDRESS` so that it uses remote TCP with local fallback: When connecting to Docker service, first the `backend` container will be tried with TCP, then an Unix Socket will be used as fallback. The Unix Socket is put in Libervia local dir which is a volume shared between containers. This way D-Bus can be used with a remote backend, or the backend can be run locally (notably during build when accounts creation or other settings must be done via Libervia CLI).
author Goffi <goffi@goffi.org>
date Wed, 08 Sep 2021 11:16:00 +0200
parents 0ffaa231138c
children 1680eec4cbfd
comparison
equal deleted inserted replaced
3646:0422c735db56 3647:57d43e3e0095
43 hg clone https://repos.goffi.org/libervia-media && \ 43 hg clone https://repos.goffi.org/libervia-media && \
44 hg clone https://repos.goffi.org/libervia-backend -u "${REVISION:-tip}" && ~/libervia_env/bin/pip install -e 'libervia-backend[SVG]' && \ 44 hg clone https://repos.goffi.org/libervia-backend -u "${REVISION:-tip}" && ~/libervia_env/bin/pip install -e 'libervia-backend[SVG]' && \
45 mv libervia-backend/libervia_backend.egg-info ~/libervia_env/lib/python3.*/site-packages && \ 45 mv libervia-backend/libervia_backend.egg-info ~/libervia_env/lib/python3.*/site-packages && \
46 mkdir -p /home/libervia/.local/share/libervia 46 mkdir -p /home/libervia/.local/share/libervia
47 47
48 ENV DBUS_SESSION_BUS_ADDRESS="tcp:host=backend,port=55555,family=ipv4;unix:path=/home/libervia/.local/share/libervia/dbus_socket"
48 ENV PATH=/home/libervia/libervia_env/bin:$PATH 49 ENV PATH=/home/libervia/libervia_env/bin:$PATH
49 50
50 COPY --chown=root:root libervia.conf /etc/_libervia.conf 51 COPY --chown=root:root libervia.conf /etc/_libervia.conf
51 COPY --chown=libervia:libervia scripts/entrypoint.sh /home/libervia/ 52 COPY --chown=libervia:libervia scripts/entrypoint.sh /home/libervia/
52 53