Mercurial > libervia-backend
comparison docker/backend_e2e/Dockerfile @ 3427:f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Nov 2020 16:31:05 +0100 |
parents | bcdfe7905409 |
children | b166a59b1724 |
comparison
equal
deleted
inserted
replaced
3426:8c25489bb79c | 3427:f023f06fa344 |
---|---|
1 FROM salutatoi/sat | 1 FROM salutatoi/sat |
2 | 2 |
3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" | 3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" |
4 | 4 |
5 USER root | 5 USER root |
6 | |
7 ARG DEBIAN_FRONTEND=noninteractive | |
8 | |
9 RUN mkdir -m 777 /reports && \ | |
10 apt-get install -y --no-install-recommends \ | |
11 # firefox is needed to test Libervia via selenium | |
12 firefox-esr \ | |
13 # VNC/X11 server for visual mode + window manager | |
14 # using openbox as it allows to resize easily when doing manual debugging/tests | |
15 # and it adapts correctly when doing driver.set_window_size | |
16 tigervnc-standalone-server openbox \ | |
17 # useful for remote debugging | |
18 telnet net-tools \ | |
19 # needed to make Firefox trust system certificates | |
20 # cf. https://askubuntu.com/a/1036637 | |
21 p11-kit && \ | |
22 ln -fs /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so /usr/lib/firefox-esr/libnssckbi.so | |
6 | 23 |
7 # we install pre-generated certificates so we can do tests with valid TLS | 24 # we install pre-generated certificates so we can do tests with valid TLS |
8 COPY --chown=root:root certificates/minica.pem /usr/local/share/ca-certificates/minica.crt | 25 COPY --chown=root:root certificates/minica.pem /usr/local/share/ca-certificates/minica.crt |
9 COPY --chown=root:tls-cert certificates/server1.test/cert.pem /usr/share/sat/certificates/server1.test.pem | 26 COPY --chown=root:tls-cert certificates/server1.test/cert.pem /usr/share/sat/certificates/server1.test.pem |
10 COPY --chown=root:tls-cert certificates/server1.test/key.pem /usr/share/sat/certificates/server1.test-key.pem | 27 COPY --chown=root:tls-cert certificates/server1.test/key.pem /usr/share/sat/certificates/server1.test-key.pem |
11 RUN update-ca-certificates | 28 RUN update-ca-certificates |
12 | 29 |
13 COPY --chown=root:root sat.conf /etc/sat.conf | 30 COPY --chown=root:root sat.conf /etc/sat.conf |
14 | 31 |
32 RUN \ | |
33 # we install webdriver (needed to control Firefox from Selenium) | |
34 # note: this is not absolutely necessary as long as we use helium because it includes | |
35 # is own webdriver | |
36 python -c 'from urllib.request import urlretrieve;\ | |
37 urlretrieve(\ | |
38 "https://github.com/mozilla/geckodriver/releases/download/v0.28.0"\ | |
39 "/geckodriver-v0.28.0-linux64.tar.gz", "/usr/local/bin/geckodriver.tar.gz")' && \ | |
40 cd /usr/local/bin && tar zxf geckodriver.tar.gz && rm -f geckodriver.tar.gz | |
41 | |
15 WORKDIR /home/sat | 42 WORKDIR /home/sat |
16 USER sat | 43 USER sat |
17 | 44 |
18 RUN pip install pytest sh | 45 RUN \ |
46 # pytest and its plugins | |
47 pip install pytest pytest-timeout \ | |
48 # needed to test jp | |
49 sh \ | |
50 # needed to test libervia | |
51 helium \ | |
52 # needed to check sent emails | |
53 aiosmtpd \ | |
54 # useful for debugging | |
55 pudb | |
56 | |
19 RUN ./entrypoint.sh \ | 57 RUN ./entrypoint.sh \ |
20 # we create the file sharing component which will autoconnect when backend is started | 58 # we create the file sharing component which will autoconnect when backend is started |
21 jp profile create file_sharing -j files.server1.test -p "" --xmpp-password test_e2e -C file_sharing -A && \ | 59 jp profile create file_sharing -j files.server1.test -p "" --xmpp-password test_e2e -C file_sharing -A && \ |
22 sat stop | 60 sat stop |
61 | |
62 ENV SAT_TEST_REPORT_DIR=/reports | |
63 ENV DISPLAY=:0 | |
64 USER root | |
65 RUN apt-get install -y openbox | |
66 USER sat | |
67 CMD /usr/bin/Xtigervnc -geometry 1024x768 -desktop "SàT e2e test" -rfbport 5900 -SecurityTypes None :0 & sleep 1 && openbox | |
68 EXPOSE 5900 |