Mercurial > libervia-backend
annotate docker/backend-dev/Dockerfile @ 3630:8ee0140cc8b6
tests (run_e2e): update tmp dir prefix following name change
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Aug 2021 14:48:39 +0200 |
parents | 443b3a784eba |
children | 0ffaa231138c |
rev | line source |
---|---|
3445
fc83c4996c77
docker: use `slim` version of Debian as base for our images
Goffi <goffi@goffi.org>
parents:
3381
diff
changeset
|
1 FROM debian:buster-slim |
3381 | 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 | |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
11 mkdir -p /usr/share/libervia/certificates && \ |
3381 | 12 addgroup tls-cert --gid 9999 && \ |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
13 chown :tls-cert /usr/share/libervia/certificates && \ |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
14 chmod 2770 /usr/share/libervia/certificates && \ |
3381 | 15 # it's better to have a dedicated user |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
16 useradd -m libervia && adduser libervia tls-cert && \ |
3381 | 17 # 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
|
18 mkdir /src && chown libervia:libervia /src && \ |
3381 | 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 | |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
28 WORKDIR /home/libervia |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
29 USER libervia |
3381 | 30 |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
31 RUN python3 -m venv libervia_env && libervia_env/bin/pip install -U pip wheel && cd /src && \ |
3381 | 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 | |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
35 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
|
36 mv urwid-satext/urwid_satext.egg-info ~/libervia_env/lib/python3.*/site-packages && \ |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
37 hg clone https://repos.goffi.org/sat_tmp && ~/libervia_env/bin/pip install -e sat_tmp && \ |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
38 mv sat_tmp/sat_tmp.egg-info ~/libervia_env/lib/python3.*/site-packages && \ |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
39 hg clone https://repos.goffi.org/sat_templates && ~/libervia_env/bin/pip install -e sat_templates && \ |
3613
443b3a784eba
docker: fix Dockerfile following repositories redirections
Goffi <goffi@goffi.org>
parents:
3497
diff
changeset
|
40 mv sat_templates/libervia_templates.egg-info ~/libervia_env/lib/python3.*/site-packages && \ |
3381 | 41 hg clone https://repos.goffi.org/sat_media && \ |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
42 hg clone https://repos.goffi.org/sat && ~/libervia_env/bin/pip install -e 'sat[SVG]' && \ |
3613
443b3a784eba
docker: fix Dockerfile following repositories redirections
Goffi <goffi@goffi.org>
parents:
3497
diff
changeset
|
43 mv sat/libervia_backend.egg-info ~/libervia_env/lib/python3.*/site-packages |
3381 | 44 |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
45 ENV DBUS_SESSION_BUS_ADDRESS=tcp:host=backend,port=55555,family=ipv4 |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
46 ENV PATH=/home/libervia/libervia_env/bin:$PATH |
3381 | 47 |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
48 COPY --chown=root:root libervia.conf /etc/_libervia.conf |
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
49 COPY --chown=libervia:libervia scripts/entrypoint.sh /home/libervia/ |
3381 | 50 |
3497
73e04040d577
docker: update following name changes:
Goffi <goffi@goffi.org>
parents:
3445
diff
changeset
|
51 ENTRYPOINT ["/home/libervia/entrypoint.sh"] |