Mercurial > sat_docs
annotate docker_legacy/prosody/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/Prosody # |
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 a Prosody version prepared for SàT # |
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/sat_pubsub: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 # AUTOMATIC CONFIGURATION # |
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 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 COPY scripts/container_server scripts/prosody /usr/local/bin/ |
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/local/bin/container_server && \ |
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/local/bin/container_server && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 chown root:root /usr/local/bin/prosody && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
22 chmod 0555 /usr/local/bin/prosody |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
23 |
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 # BASE # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 ######## |
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 RUN apt-get install -y --no-install-recommends lsb-release && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
29 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
30 # we add prosody repository and key |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
31 echo deb http://packages.prosody.im/debian $(lsb_release -sc) main > /etc/apt/sources.list.d/prosody.list && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
32 python -c 'import urllib2;import subprocess as s;s.Popen(["apt-key","add","-"], stdin=s.PIPE).communicate(urllib2.urlopen("https://prosody.im/files/prosody-debian-packages.key").read())' && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
33 apt-get update && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
34 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
35 # and install prosody and apg (to generate passwords) |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
36 apt-get install -y apg prosody-trunk && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
37 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
|
38 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
39 # prosody user need to access (and write) certificates |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
40 adduser prosody tls-cert && \ |
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 # prosody need to access /var/run to write it's pid |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
43 mkdir -p /var/run/prosody; chown prosody:adm /var/run/prosody |
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 ################### |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
46 # PROSODY MODULES # |
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 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
49 RUN cd /tmp && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
50 hg clone https://hg.prosody.im/prosody-modules/ prosody-modules && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
51 cd prosody-modules && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
52 for mod in privilege delegation ipcheck http_upload;do cp mod_$mod/mod_$mod.lua /usr/lib/prosody/modules;done && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
53 cd /tmp && rm -rf prosody-modules |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
54 |
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 # CONFIGURATION # |
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 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
59 ADD prosody.cfg.lua /etc/prosody/prosody_sat_cfg/ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
60 RUN cd /etc/prosody && chown -R prosody:prosody prosody_sat_cfg && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
61 ln -fs prosody_sat_cfg/prosody.cfg.lua prosody.cfg.lua && \ |
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 ############### |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
64 # CERTIFICATE # |
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 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
67 # We want to use the 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
|
68 # and we don't want any certificate in the image, |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
69 # they'll be generated at launch or mounted in container |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
70 rm -rf /etc/localhost.key /etc/prosody/certs/* |
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 ######### |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
73 # PORTS # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
74 ######### |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
75 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
76 # client to server (C2S), |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
77 # server to server (S2S), |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
78 # HTTP upload, |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
79 # and HTTP upload (HTTPS) |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
80 EXPOSE 5222 5269 5280 5281 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
81 |
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 # LAUNCH # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
84 ########## |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
85 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
86 USER prosody |
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 ENTRYPOINT ["prosody"] |