Mercurial > libervia-backend
annotate docker/backend/Dockerfile @ 3471:d897597cfa94
plugin list: set `overwrite_policy` to `any_publisher` for `grocery` list
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 27 Feb 2021 18:33:53 +0100 |
parents | fc83c4996c77 |
children |
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 | |
11 mkdir -p /usr/share/sat/certificates && \ | |
12 addgroup tls-cert --gid 9999 && \ | |
13 chown :tls-cert /usr/share/sat/certificates && \ | |
14 chmod 2770 /usr/share/sat/certificates && \ | |
15 # it's better to have a dedicated user | |
16 useradd -m sat && adduser sat tls-cert && \ | |
17 # we'll put all source there to have an easy mount point | |
18 mkdir /src && chown sat:sat /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/sat | |
29 USER sat | |
30 | |
31 RUN python3 -m venv sat_env && sat_env/bin/pip install 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 && ~/sat_env/bin/pip install -e urwid-satext && \ | |
36 mv urwid-satext/urwid_satext.egg-info ~/sat_env/lib/python3.*/site-packages && \ | |
37 hg clone https://repos.goffi.org/sat_tmp && ~/sat_env/bin/pip install -e sat_tmp && \ | |
38 mv sat_tmp/sat_tmp.egg-info ~/sat_env/lib/python3.*/site-packages && \ | |
39 hg clone https://repos.goffi.org/sat_templates && ~/sat_env/bin/pip install -e sat_templates && \ | |
40 mv sat_templates/sat_templates.egg-info ~/sat_env/lib/python3.*/site-packages && \ | |
41 hg clone https://repos.goffi.org/sat_media && \ | |
42 hg clone https://repos.goffi.org/sat && ~/sat_env/bin/pip install -e 'sat[SVG]' && \ | |
43 mv sat/sat.egg-info ~/sat_env/lib/python3.*/site-packages | |
44 | |
45 ENV DBUS_SESSION_BUS_ADDRESS=tcp:host=sat,port=55555,family=ipv4 | |
46 ENV PATH=/home/sat/sat_env/bin:$PATH | |
47 | |
48 COPY --chown=root:root sat.conf /etc/_sat.conf | |
49 COPY --chown=sat:sat scripts/entrypoint.sh /home/sat/ | |
50 | |
51 ENTRYPOINT ["/home/sat/entrypoint.sh"] |