Mercurial > libervia-backend
comparison docker/backend-dev-e2e/Dockerfile @ 3497:73e04040d577
docker: update following name changes:
`backend_e2e` now print properly backend logs
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 16 Apr 2021 18:32:16 +0200 |
parents | docker/backend_e2e/Dockerfile@b166a59b1724 |
children | 0ffaa231138c |
comparison
equal
deleted
inserted
replaced
3496:c018c510a562 | 3497:73e04040d577 |
---|---|
1 FROM libervia/backend:dev | |
2 | |
3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" | |
4 | |
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 | |
23 | |
24 # we install pre-generated certificates so we can do tests with valid TLS | |
25 COPY --chown=root:root certificates/minica.pem /usr/local/share/ca-certificates/minica.crt | |
26 COPY --chown=root:tls-cert certificates/server1.test/cert.pem /usr/share/libervia/certificates/server1.test.pem | |
27 COPY --chown=root:tls-cert certificates/server1.test/key.pem /usr/share/libervia/certificates/server1.test-key.pem | |
28 RUN update-ca-certificates | |
29 | |
30 COPY --chown=root:root libervia.conf /etc/libervia.conf | |
31 COPY --chown=libervia:libervia scripts/entrypoint.sh /home/libervia/entrypoint_e2e.sh | |
32 | |
33 RUN \ | |
34 # we install webdriver (needed to control Firefox from Selenium) | |
35 # note: this is not absolutely necessary as long as we use helium because it includes | |
36 # is own webdriver | |
37 python -c 'from urllib.request import urlretrieve;\ | |
38 urlretrieve(\ | |
39 "https://github.com/mozilla/geckodriver/releases/download/v0.28.0"\ | |
40 "/geckodriver-v0.28.0-linux64.tar.gz", "/usr/local/bin/geckodriver.tar.gz")' && \ | |
41 cd /usr/local/bin && tar zxf geckodriver.tar.gz && rm -f geckodriver.tar.gz | |
42 | |
43 WORKDIR /home/libervia | |
44 USER libervia | |
45 | |
46 RUN \ | |
47 # pytest and its plugins | |
48 pip install pytest pytest-timeout pytest-dependency \ | |
49 # needed to test jp | |
50 sh \ | |
51 # needed to test libervia | |
52 helium \ | |
53 # needed to check sent emails | |
54 aiosmtpd \ | |
55 # useful for debugging | |
56 pudb | |
57 | |
58 RUN ./entrypoint.sh \ | |
59 # we create the file sharing component which will autoconnect when backend is started | |
60 jp profile create file_sharing -j files.server1.test -p "" --xmpp-password test_e2e -C file_sharing -A && \ | |
61 libervia-backend stop | |
62 | |
63 ENV LIBERVIA_TEST_REPORT_DIR=/reports | |
64 ENV DISPLAY=:0 | |
65 USER root | |
66 RUN apt-get install -y openbox | |
67 USER libervia | |
68 EXPOSE 5900 | |
69 | |
70 ENTRYPOINT ["/home/libervia/entrypoint_e2e.sh"] |