comparison docker/backend-dev/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/Dockerfile@fc83c4996c77
children 443b3a784eba
comparison
equal deleted inserted replaced
3496:c018c510a562 3497:73e04040d577
1 FROM debian:buster-slim
2
3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
4
5 ARG DEBIAN_FRONTEND=noninteractive
6
7 RUN apt-get update && apt-get upgrade -y && \
8 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 && \
9 \
10 # will be used to put many SàT specific data
11 mkdir -p /usr/share/libervia/certificates && \
12 addgroup tls-cert --gid 9999 && \
13 chown :tls-cert /usr/share/libervia/certificates && \
14 chmod 2770 /usr/share/libervia/certificates && \
15 # it's better to have a dedicated user
16 useradd -m libervia && adduser libervia tls-cert && \
17 # we'll put all source there to have an easy mount point
18 mkdir /src && chown libervia:libervia /src && \
19 \
20 # we need UTF-8 locale
21 sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen && \
22 \
23 # we need a TCP socket for D-Bus
24 sed -i "s&<listen>unix:tmpdir=/tmp</listen>&\0\n <listen>tcp:host=localhost,bind=*,port=55555,family=ipv4</listen>\n <auth>ANONYMOUS</auth>\n <allow_anonymous/>&" /usr/share/dbus-1/session.conf
25
26 ENV LC_ALL en_US.UTF-8
27
28 WORKDIR /home/libervia
29 USER libervia
30
31 RUN python3 -m venv libervia_env && libervia_env/bin/pip install -U pip wheel && cd /src && \
32 # We install thoses packages in editable mode, so we can replace them easily with volumes.
33 # We need to move *.egg-info (generated by pip) out of src dirs, otherwise mounting
34 # local repos without it them cause troubles
35 hg clone https://repos.goffi.org/urwid-satext && ~/libervia_env/bin/pip install -e urwid-satext && \
36 mv urwid-satext/urwid_satext.egg-info ~/libervia_env/lib/python3.*/site-packages && \
37 hg clone https://repos.goffi.org/sat_tmp && ~/libervia_env/bin/pip install -e sat_tmp && \
38 mv sat_tmp/sat_tmp.egg-info ~/libervia_env/lib/python3.*/site-packages && \
39 hg clone https://repos.goffi.org/sat_templates && ~/libervia_env/bin/pip install -e sat_templates && \
40 mv sat_templates/sat_templates.egg-info ~/libervia_env/lib/python3.*/site-packages && \
41 hg clone https://repos.goffi.org/sat_media && \
42 hg clone https://repos.goffi.org/sat && ~/libervia_env/bin/pip install -e 'sat[SVG]' && \
43 mv sat/sat.egg-info ~/libervia_env/lib/python3.*/site-packages
44
45 ENV DBUS_SESSION_BUS_ADDRESS=tcp:host=backend,port=55555,family=ipv4
46 ENV PATH=/home/libervia/libervia_env/bin:$PATH
47
48 COPY --chown=root:root libervia.conf /etc/_libervia.conf
49 COPY --chown=libervia:libervia scripts/entrypoint.sh /home/libervia/
50
51 ENTRYPOINT ["/home/libervia/entrypoint.sh"]