annotate docker/backend-dev-e2e/Dockerfile @ 4323:a8bceb29b1ff

core (memory/params): set default resource priority to 0: Priority was historically set to 50 to follow behaviour of other clients at the time, but it's nowadays a legacy feature, and a non zero value can cause trouble if message carbon is not used.
author Goffi <goffi@goffi.org>
date Wed, 20 Nov 2024 11:28:23 +0100
parents 67de9ed101aa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3689
f25442794e11 docker: fix use of `REVISION` in `FROM` instruction
Goffi <goffi@goffi.org>
parents: 3688
diff changeset
1 ARG REVISION
f25442794e11 docker: fix use of `REVISION` in `FROM` instruction
Goffi <goffi@goffi.org>
parents: 3688
diff changeset
2 FROM libervia/backend:${REVISION:-dev}
3381
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
3
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
5
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 USER root
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
7
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
8 ARG DEBIAN_FRONTEND=noninteractive
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
9
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
10 RUN mkdir -m 777 /reports && \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
11 apt-get install -y --no-install-recommends \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
12 # firefox is needed to test Libervia via selenium
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
13 firefox-esr \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
14 # VNC/X11 server for visual mode + window manager
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
15 # using openbox as it allows to resize easily when doing manual debugging/tests
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
16 # and it adapts correctly when doing driver.set_window_size
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
17 tigervnc-standalone-server openbox \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
18 # useful for remote debugging
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
19 telnet net-tools \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
20 # needed to make Firefox trust system certificates
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
21 # cf. https://askubuntu.com/a/1036637
4234
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
22 p11-kit \
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
23 # GStreamer, used to test WebRTC stack
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
24 libgstreamer1.0-0 \
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
25 gstreamer1.0-plugins-base \
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
26 gstreamer1.0-plugins-good \
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
27 gstreamer1.0-plugins-bad \
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
28 gstreamer1.0-nice \
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
29 gir1.2-gstreamer-1.0 \
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
30 gir1.2-gst-plugins-bad-1.0 \
67de9ed101aa docker (e2e): add GStreamer dependencies to test WebRTC stack:
Goffi <goffi@goffi.org>
parents: 4215
diff changeset
31 python3-gst-1.0 && \
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
32 ln -fs /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so /usr/lib/firefox-esr/libnssckbi.so
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
33
3381
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 # we install pre-generated certificates so we can do tests with valid TLS
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 COPY --chown=root:root certificates/minica.pem /usr/local/share/ca-certificates/minica.crt
3497
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
36 COPY --chown=root:tls-cert certificates/server1.test/cert.pem /usr/share/libervia/certificates/server1.test.pem
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
37 COPY --chown=root:tls-cert certificates/server1.test/key.pem /usr/share/libervia/certificates/server1.test-key.pem
3381
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 RUN update-ca-certificates
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
39
3497
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
40 COPY --chown=root:root libervia.conf /etc/libervia.conf
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
41 COPY --chown=libervia:libervia scripts/entrypoint.sh /home/libervia/entrypoint_e2e.sh
3381
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
42
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
43 RUN \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
44 # we install webdriver (needed to control Firefox from Selenium)
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
45 # note: this is not absolutely necessary as long as we use helium because it includes
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
46 # is own webdriver
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
47 python -c 'from urllib.request import urlretrieve;\
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
48 urlretrieve(\
4215
31c84a32c897 docker: modernisation and fixes:
Goffi <goffi@goffi.org>
parents: 3709
diff changeset
49 "https://github.com/mozilla/geckodriver/releases/download/v0.34.0"\
31c84a32c897 docker: modernisation and fixes:
Goffi <goffi@goffi.org>
parents: 3709
diff changeset
50 "/geckodriver-v0.34.0-linux64.tar.gz", "/usr/local/bin/geckodriver.tar.gz")' && \
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
51 cd /usr/local/bin && tar zxf geckodriver.tar.gz && rm -f geckodriver.tar.gz
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
52
3497
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
53 WORKDIR /home/libervia
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
54 USER libervia
3381
127dde80a0a5 docker: dockers images, first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
55
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
56 RUN \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
57 # pytest and its plugins
3671
9c50d2f812c1 docker (e2e): add `pytest-twisted` to image
Goffi <goffi@goffi.org>
parents: 3641
diff changeset
58 pip install pytest pytest-timeout pytest-dependency pytest-twisted \
3641
0ffaa231138c docker: Libervia revision can now be specified:
Goffi <goffi@goffi.org>
parents: 3497
diff changeset
59 # needed to test libervia-cli
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
60 sh \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
61 # needed to test libervia
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
62 helium \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
63 # needed to check sent emails
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
64 aiosmtpd \
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
65 # useful for debugging
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
66 pudb
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
67
3385
bcdfe7905409 docker (backend_e2e): install pytest and sh
Goffi <goffi@goffi.org>
parents: 3381
diff changeset
68 RUN ./entrypoint.sh \
bcdfe7905409 docker (backend_e2e): install pytest and sh
Goffi <goffi@goffi.org>
parents: 3381
diff changeset
69 # we create the file sharing component which will autoconnect when backend is started
3688
d5fd630b57bb docker: fix use of File Sharing component following entry point renaming
Goffi <goffi@goffi.org>
parents: 3641
diff changeset
70 li profile create file-sharing -j files.server1.test -p "" --xmpp-password test_e2e -C file-sharing -A && \
3497
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
71 libervia-backend stop
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
72
3497
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
73 ENV LIBERVIA_TEST_REPORT_DIR=/reports
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
74 ENV DISPLAY=:0
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
75 USER root
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
76 RUN apt-get install -y openbox
3497
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
77 USER libervia
3427
f023f06fa344 docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents: 3385
diff changeset
78 EXPOSE 5900
3497
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
79
73e04040d577 docker: update following name changes:
Goffi <goffi@goffi.org>
parents: 3439
diff changeset
80 ENTRYPOINT ["/home/libervia/entrypoint_e2e.sh"]