Mercurial > sat_docs
annotate docker/libervia/Dockerfile @ 138:274af514a5cf
flatpak: reworked packages + made a building script:
a new `build_manifest.py` script can now be used to generate flatpak manifests for every frontend of SàT.
The manifest can be used both for development versions and stable ones.
Templates files (in the form `_tmp_<app-id>.json`) are used to set building instructions.
A common runtime specific to SàT has been abandoned following a discussion on the official mailing list.
A small wrapper is now used to launch backend automatically if it's not found.
Desktop and app metadata have been added for Cagou.
Jp and Primitivus don't have appdata and desktop files yet.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 22 Jun 2019 15:59:07 +0200 |
parents | 8b228fd053bc |
children |
rev | line source |
---|---|
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 #################################################################### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 # # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 # Salut à Toi/Libervia # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 # This Dockerfile build Libervia, the web frontend for Salut à Toi # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 # Salut à Toi is a multi-frontends multi-purposes XMPP client # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 # # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 #################################################################### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 FROM salutatoi/media:latest |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 MAINTAINER Goffi <goffi@goffi.org> |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 |
105 | 13 ##################### |
14 # FIRST LAUNCH TEST # | |
15 ##################### | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 |
105 | 17 COPY scripts/libervia_cont_launch /usr/bin/ |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 |
105 | 19 RUN chown root:root /usr/bin/libervia_cont_launch && \ |
20 chmod 0555 /usr/bin/libervia_cont_launch && \ | |
80 | 21 |
105 | 22 ######### |
23 # D-Bus # | |
24 ######### | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 |
105 | 26 cp /usr/local/bin/dbus_wrap /usr/local/bin/libervia_cont_launch && \ |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
27 |
85
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
28 ################# |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
29 # CONFIGURATION # |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
30 ################# |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
31 |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
32 # we want to use certificates in /usr/share/sat/certificates |
105 | 33 echo "\n[libervia]\n\ |
85
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
34 tls_private_key = /usr/share/sat/certificates/libervia.key\n\ |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
35 tls_certificate = /usr/share/sat/certificates/libervia.crt\n\ |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
36 connection_type = both\n\ |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
37 redirect_to_https = 0" >> /etc/sat.conf |
bcba1966e6db
docker: certificate generation + various improvments:
Goffi <goffi@goffi.org>
parents:
80
diff
changeset
|
38 |
105 | 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 && \ | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
57 |
105 | 58 python bootstrap.py && \ |
59 | |
60 ln -s /tmp/pyjamas/bin/pyjsbuild /usr/local/bin/pyjsbuild && \ | |
61 | |
62 ############ | |
63 # LIBERVIA # | |
64 ############ | |
65 | |
106
8b228fd053bc
docker (base, libervia): use new getRepositoryData ability to save data in a .hg_data file
Goffi <goffi@goffi.org>
parents:
105
diff
changeset
|
66 cd /tmp && hg clone https://repos.goffi.org/libervia && \ |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
67 |
105 | 68 cd libervia && \ |
69 | |
70 python setup.py install && \ | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
71 |
106
8b228fd053bc
docker (base, libervia): use new getRepositoryData ability to save data in a .hg_data file
Goffi <goffi@goffi.org>
parents:
105
diff
changeset
|
72 # as for SàT backend, we save repos data |
8b228fd053bc
docker (base, libervia): use new getRepositoryData ability to save data in a .hg_data file
Goffi <goffi@goffi.org>
parents:
105
diff
changeset
|
73 # so Libervia can get repository version |
105 | 74 # TODO: should be done in setup.py in the future |
106
8b228fd053bc
docker (base, libervia): use new getRepositoryData ability to save data in a .hg_data file
Goffi <goffi@goffi.org>
parents:
105
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")' && \ |
105 | 76 |
77 # some cleaning before finishing the layer | |
78 cd /tmp && rm -rf libervia pyjamas /usr/local/bin/pyjsbuild | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
79 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
80 ######### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
81 # Ports # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
82 ######### |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
83 |
105 | 84 # HTTP and HTTPS |
85 EXPOSE 8080 8443 | |
21
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
86 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
87 ########## |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
88 # LAUNCH # |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
89 ########## |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
90 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
91 USER sat |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
92 |
0e78c8a4626e
Added Dockerfiles to create Docker images for easy installation + scripts to manages them. see README for details.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
93 ENTRYPOINT ["libervia_cont_launch", "fg"] |