Mercurial > sat_docs
comparison docker_legacy/libervia/Dockerfile @ 164:29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 01 Jan 2021 18:33:52 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
163:a63f6d360326 | 164:29873a41aae1 |
---|---|
1 #################################################################### | |
2 # # | |
3 # Salut à Toi/Libervia # | |
4 # This Dockerfile build Libervia, the web frontend for Salut à Toi # | |
5 # Salut à Toi is a multi-frontends multi-purposes XMPP client # | |
6 # # | |
7 #################################################################### | |
8 | |
9 FROM salutatoi/media:latest | |
10 | |
11 MAINTAINER Goffi <goffi@goffi.org> | |
12 | |
13 ##################### | |
14 # FIRST LAUNCH TEST # | |
15 ##################### | |
16 | |
17 COPY scripts/libervia_cont_launch /usr/bin/ | |
18 | |
19 RUN chown root:root /usr/bin/libervia_cont_launch && \ | |
20 chmod 0555 /usr/bin/libervia_cont_launch && \ | |
21 | |
22 ######### | |
23 # D-Bus # | |
24 ######### | |
25 | |
26 cp /usr/local/bin/dbus_wrap /usr/local/bin/libervia_cont_launch && \ | |
27 | |
28 ################# | |
29 # CONFIGURATION # | |
30 ################# | |
31 | |
32 # we want to use certificates in /usr/share/sat/certificates | |
33 echo "\n[libervia]\n\ | |
34 tls_private_key = /usr/share/sat/certificates/libervia.key\n\ | |
35 tls_certificate = /usr/share/sat/certificates/libervia.crt\n\ | |
36 connection_type = both\n\ | |
37 redirect_to_https = 0" >> /etc/sat.conf | |
38 | |
39 ################ | |
40 # dependencies # | |
41 ################ | |
42 | |
43 RUN pip install txJSON-RPC && \ | |
44 | |
45 apt-get install -y --no-install-recommends python-jinja2 && apt-get clean && \ | |
46 | |
47 ########### | |
48 # PYJAMAS # | |
49 ########### | |
50 | |
51 cd /tmp && \ | |
52 | |
53 # as the situation with pyjamas is complicated, we get the archive from our own ftp | |
54 python -c 'import urllib2,tarfile,cStringIO;tar=tarfile.open(fileobj=cStringIO.StringIO(urllib2.urlopen("https://ftp.goffi.org/pyjamas/pyjamas.tar.bz2").read()));tar.extractall()' && \ | |
55 | |
56 cd pyjamas && \ | |
57 | |
58 python bootstrap.py && \ | |
59 | |
60 ln -s /tmp/pyjamas/bin/pyjsbuild /usr/local/bin/pyjsbuild && \ | |
61 | |
62 ############ | |
63 # LIBERVIA # | |
64 ############ | |
65 | |
66 cd /tmp && hg clone https://repos.goffi.org/libervia && \ | |
67 | |
68 cd libervia && \ | |
69 | |
70 python setup.py install && \ | |
71 | |
72 # as for SàT backend, we save repos data | |
73 # so Libervia can get repository version | |
74 # TODO: should be done in setup.py in the future | |
75 python -c 'from sat.tools import utils;utils.getRepositoryData("/tmp/libervia", is_path=True, save_dir_path="/usr/local/lib/python2.7/dist-packages/libervia")' && \ | |
76 | |
77 # some cleaning before finishing the layer | |
78 cd /tmp && rm -rf libervia pyjamas /usr/local/bin/pyjsbuild | |
79 | |
80 ######### | |
81 # Ports # | |
82 ######### | |
83 | |
84 # HTTP and HTTPS | |
85 EXPOSE 8080 8443 | |
86 | |
87 ########## | |
88 # LAUNCH # | |
89 ########## | |
90 | |
91 USER sat | |
92 | |
93 ENTRYPOINT ["libervia_cont_launch", "fg"] |