Mercurial > libervia-backend
annotate docker/backend-dev/Dockerfile @ 3648:71cfe9334f73
bridge (dbus/frontend): reintrospect signature in case of guess error:
When a "Unable to guess signature […]" `ValueError` is raised during a method call, the
signatures are re-introspected. This should fix this issue when a frontend is launched
just after to the backend (this happens notably with tests).
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 08 Sep 2021 11:16:21 +0200 |
parents | 57d43e3e0095 |
children | 1680eec4cbfd |
rev | line source |
---|---|
3641
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
1 FROM debian:bullseye-slim |
3381 | 2 |
3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" | |
4 | |
3641
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
5 ARG REVISION |
3381 | 6 ARG DEBIAN_FRONTEND=noninteractive |
7 | |
3641
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
8 RUN echo "Building image for Libervia ${REVISION:-dev}" && \ |
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
9 apt-get update && apt-get upgrade -y && \ |
3381 | 10 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 && \ |
11 \ | |
3641
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
12 # will be used to put many Libervia specific data |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
13 mkdir -p /usr/share/libervia/certificates && \ |
3381 | 14 addgroup tls-cert --gid 9999 && \ |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
15 chown :tls-cert /usr/share/libervia/certificates && \ |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
16 chmod 2770 /usr/share/libervia/certificates && \ |
3381 | 17 # it's better to have a dedicated user |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
18 useradd -m libervia && adduser libervia tls-cert && \ |
3381 | 19 # we'll put all source there to have an easy mount point |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
20 mkdir /src && chown libervia:libervia /src && \ |
3381 | 21 \ |
22 # we need UTF-8 locale | |
3641
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
23 sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen |
3381 | 24 |
25 ENV LC_ALL en_US.UTF-8 | |
3641
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
26 ENV DOCKER_LIBERVIA_REV=${REVISION:-dev} |
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
27 |
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
28 COPY --chown=root:root session.conf /usr/share/dbus-1/session.conf |
3381 | 29 |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
30 WORKDIR /home/libervia |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
31 USER libervia |
3381 | 32 |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
33 RUN python3 -m venv libervia_env && libervia_env/bin/pip install -U pip wheel && cd /src && \ |
3381 | 34 # We install thoses packages in editable mode, so we can replace them easily with volumes. |
35 # We need to move *.egg-info (generated by pip) out of src dirs, otherwise mounting | |
36 # local repos without it them cause troubles | |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
37 hg clone https://repos.goffi.org/urwid-satext && ~/libervia_env/bin/pip install -e urwid-satext && \ |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
38 mv urwid-satext/urwid_satext.egg-info ~/libervia_env/lib/python3.*/site-packages && \ |
3641
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
39 hg clone https://repos.goffi.org/sat_tmp -u "${REVISION:-tip}" && ~/libervia_env/bin/pip install -e sat_tmp && \ |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
40 mv sat_tmp/sat_tmp.egg-info ~/libervia_env/lib/python3.*/site-packages && \ |
3641
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
41 hg clone https://repos.goffi.org/libervia-templates && ~/libervia_env/bin/pip install -e libervia-templates && \ |
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
42 mv libervia-templates/libervia_templates.egg-info ~/libervia_env/lib/python3.*/site-packages && \ |
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
43 hg clone https://repos.goffi.org/libervia-media && \ |
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
44 hg clone https://repos.goffi.org/libervia-backend -u "${REVISION:-tip}" && ~/libervia_env/bin/pip install -e 'libervia-backend[SVG]' && \ |
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
45 mv libervia-backend/libervia_backend.egg-info ~/libervia_env/lib/python3.*/site-packages && \ |
0ffaa231138c
docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents:
3613
diff
changeset
|
46 mkdir -p /home/libervia/.local/share/libervia |
3381 | 47 |
3647
57d43e3e0095
docker: set `DBUS_SESSION_BUS_ADDRESS` so that it uses remote TCP with local fallback:
Goffi <goffi@goffi.org>
parents:
3641
diff
changeset
|
48 ENV DBUS_SESSION_BUS_ADDRESS="tcp:host=backend,port=55555,family=ipv4;unix:path=/home/libervia/.local/share/libervia/dbus_socket" |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
49 ENV PATH=/home/libervia/libervia_env/bin:$PATH |
3381 | 50 |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
51 COPY --chown=root:root libervia.conf /etc/_libervia.conf |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
52 COPY --chown=libervia:libervia scripts/entrypoint.sh /home/libervia/ |
3381 | 53 |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
54 ENTRYPOINT ["/home/libervia/entrypoint.sh"] |