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